Created attachment 7012 [details] readelf -t on the so file before and after running objcopy -R When I try to remove the build id note from a shared library using "objcopy -R .note.gnu.build-id lib.so", the library becomes unusable. $ objdump -T libjvm.so | grep jio_vfprint 00000000005715a0 g DF .text 0000000000000026 SUNWprivate_1.1 jio_vfprintf $ objcopy -R .note.gnu.build-id libjvm.so $ objdump -T libjvm.so | grep jio_vfprint 00000000005715a0 g DF .fini 0000000000000026 SUNWprivate_1.1 jio_vfprintf The function is "moved" from the .text to the .fini section, which makes this shared object unusable (I get errors when linking this .so).
Created attachment 7013 [details] readelf -s on the shared object before and after running objcopy -R
objcopy -R can't be used to remove loaded sections from a final linked executable.