bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/16417] executable linked with gold segfaults before main


From: amodra at gmail dot com
Subject: [Bug gold/16417] executable linked with gold segfaults before main
Date: Sat, 05 Apr 2014 01:10:51 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=16417

--- Comment #10 from Alan Modra <amodra at gmail dot com> ---
I was also puzzled as to why libpthread.so is exporting symbols defined in
libc.so, and vice versa, but on looking at the code there is some justification
for some of the duplication.  The libc versions have extra code (testing for
multple threads) before taking locks.  So the libc versions would be a tiny bit
slower than libpthread versions, when you know for sure that multiple threads
are running.  Now if you're linking against libpthread you probably do have
multiple threads, but clearly the testcase in comment #6 does not have multiple
threads but manages to pull in libpthread.  Note that this is *not* via the
weak reference to __pthread_key_create but due to the duplicate symbols!  And
if libpthread is pulled in accidentally, then single-threaded code will run
slower..

Another thing I just found is that the testcase in comment #6 does not segfault
when linked by mainline gold on my x86_64 system.  (My g++ reports
(Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3)  I guess I should have checked gold
before reopening this bug.

I think it likely that newer versions of libstdc++ are at fault here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]