Hello, The symbol __i686.get_pc_thunk.bx, which is present in both libc.a and libc_nonshared.a, is stored in several specimens in libc_nonshared.a. GCC doesn't seem to care, as I didn't encounter any problem with it ; but at least TinyCC croaks on this duplicated symbol and hence refuses to link any program calling atexit(). Regards. Reproducible: Always Steps to Reproduce: nm /usr/lib/libc_nonshared.a | grep "T " | sort | uniq -dc Actual Results: 13 00000000 T __i686.get_pc_thunk.bx Expected Results: 1 00000000 T __i686.get_pc_thunk.bx
Created attachment 115898 [details] emerge --info emerge --info
Sorry, this is not a glibc bug. See Bug 130831, Comment #9 and following.
Thank you for your guidance, and sorry for mistargeting the bug. I was surprised to see this symbol duplicated in libc_nonshared because this wasn't the case in my other linux systems. From the pieces of information available at http://sourceware.org/ml/binutils/2003-03/msg00446.html and http://www.sco.com/developers/gabi/2000-07-17/ch4.symtab.html#visibility, I wrote a patch to set the visibility to the most restrictive one when a duplicate symbol is added, and then to skip it if its visibility is HIDDEN or INTERNAL. This seems to fix the problem.
Created attachment 115928 [details] visibility patch
Created attachment 115929 [details] updated ebuild
Thank you for the patch. Have you let upstream know about this, too?
I posted the bug to their mailing list. They'll do some investigations before considering adding the patch. The discussion should appear soon at http://lists.gnu.org/archive/html/tinycc-devel/2007-04/
Closing, this has been included in 0.9.24 which has been in the tree for quite some time.