[Top][All Lists]

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

[Bug ld/15636] [2.24 regression] missing NEEDED libc when building with

From: doko at debian dot org
Subject: [Bug ld/15636] [2.24 regression] missing NEEDED libc when building with g++ -Wl,--as-needed
Date: Mon, 17 Jun 2013 11:36:45 +0000


--- Comment #1 from Matthias Klose <doko at debian dot org> ---
Zack Weinberg commented in the Debian report:

I think the linker is doing exactly what it's supposed to in this case
-- weak symbols *shouldn't* provoke NEEDED entries all by themselves.
A standard use case, for instance, is to take weak references to
pthread_mutex_(un)lock and then call them only if the function
addresses are non-NULL at runtime -- if that by itself dragged in
libpthread it would vitiate the optimization.

If you do the exact same test with a shared object that explicitly
calls something in libc (say, 'puts') that's a strong reference and
you will get a NEEDED entry.

As for the lack of version tagging on the weak reference, I can't say
whether this is a problem in general, but in the case of
__cxa_finalize, I'm pretty sure it isn't: a GLIBC_2.2.5 version
indicates a function that has not changed since the introduction of
symbol versioning in libc.so.6, and the spec governing
__cxa_finalize's behavior hasn't changed since 2003ish.

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]