http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59842
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- URL|http://bugs.debian.org/cgi- | |bin/bugreport.cgi?bug=73556 | |4 | See Also| |http://bugs.debian.org/7355 | |64 --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I don't think this is a GCC bug but rather a bug using objcopy and thinking that will not get rid of hidden global symbols. The .text.__x86.get_pc_thunk.[bc]x symbols are defined as: .section .text.__x86.get_pc_thunk.cx,"axG",@progbits,__x86.get_pc_thunk.cx,comdat .globl __x86.get_pc_thunk.cx .hidden __x86.get_pc_thunk.cx .type __x86.get_pc_thunk.cx, @function __x86.get_pc_thunk.cx: .LFB15: .cfi_startproc movl (%esp), %ecx ret .cfi_endproc .LFE15: .section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat .globl __x86.get_pc_thunk.bx .hidden __x86.get_pc_thunk.bx .type __x86.get_pc_thunk.bx, @function __x86.get_pc_thunk.bx: .LFB16: .cfi_startproc movl (%esp), %ebx ret So they are already hidden so when doing the final link they will not show up in the shared library. The objcopy is removing the symbol names for these section which is invalid as they are comdat and cannot be removed. Really the code should move over to a versioning script instead of using objcopy and that would work much better and be slightly more portable.