Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 174034 - dev-lang/tcc chokes on duplicated __i686.get_pc_thunk.bx symbol
Summary: dev-lang/tcc chokes on duplicated __i686.get_pc_thunk.bx symbol
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Maintainers for Miscelleneous Language Packages [OBSOLETE]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-10 14:05 UTC by Vincent Pit
Modified: 2009-07-10 18:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (info.txt,3.64 KB, text/plain)
2007-04-10 14:05 UTC, Vincent Pit
Details
visibility patch (tcc-0.9.23-visibility.patch,2.04 KB, text/plain)
2007-04-10 19:35 UTC, Vincent Pit
Details
updated ebuild (tcc-0.9.23-r2.ebuild,1.49 KB, text/plain)
2007-04-10 19:36 UTC, Vincent Pit
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Pit 2007-04-10 14:05:25 UTC
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
Comment 1 Vincent Pit 2007-04-10 14:05:55 UTC
Created attachment 115898 [details]
emerge --info

emerge --info
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-04-10 17:05:40 UTC
Sorry, this is not a glibc bug. See Bug 130831, Comment #9 and following.
Comment 3 Vincent Pit 2007-04-10 19:34:34 UTC
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.
Comment 4 Vincent Pit 2007-04-10 19:35:17 UTC
Created attachment 115928 [details]
visibility patch
Comment 5 Vincent Pit 2007-04-10 19:36:23 UTC
Created attachment 115929 [details]
updated ebuild
Comment 6 Harald van Dijk (RETIRED) gentoo-dev 2007-04-11 19:47:54 UTC
Thank you for the patch. Have you let upstream know about this, too?
Comment 7 Vincent Pit 2007-04-12 19:32:31 UTC
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/
Comment 8 Harald van Dijk (RETIRED) gentoo-dev 2009-07-10 18:17:38 UTC
Closing, this has been included in 0.9.24 which has been in the tree for quite some time.