Once the shared library is linked, you can no longer tell which parts of it came from which object file.
You can search the individual objects from which you build the library:
find . -name '*.o' -print0 | xargs -0 nm -A | egrep ' (i|y)$'
You can ask the linker to tell you when they are defined:
$(CC) -fPIC -shared -o libmy.so $(OBJS) -Wl,-y,i,-y,y
If you built the library from objects compiled with -g
, you may ask GDB where i
and y
came from:
gdb -q libmy.so
(gdb) info var ^i$
(gdb) info var ^y$