This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: RFC: linker enhancements
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 12 Dec 2003 08:29:18 -0800
- Subject: Re: RFC: linker enhancements
- References: <20031212112448.GI12344@sunsite.ms.mff.cuni.cz>
Jakub Jelinek <jakub@redhat.com> writes:
> E.g. for libgcc_s for C dynamically linked programs which are using
> -fexceptions (which is quite rare these days), GCC currently links
> in libgcc_eh.a. It would be better to link against libgcc_s in that
> case (so that there is just one unwinder etc.), on the other side
> for the 99% of C dynamically linked programs which don't need it
> linking against a shared library they don't use is a waste.
I've suggested before that *all* shared libraries should get
DT_NEEDED-ed into the executable only if they resolve undefined
symbols - "just like" static libraries. (Check over your system and
see how many applications load libnsl, though it's totally
unnecessary, because they used AC_CHECK_LIB instead of AC_SEARCH_LIBS
in their configure script.)
zw