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

Bug#273264: gcc-3.3: wrong linker path embedded in binaries, misuse of ld?



On Fri, Sep 24, 2004 at 03:44:39PM -0700, Steve Langasek wrote:
> Package: gcc-3.3
> Version: 1:3.3.4-12
> 
> Using this version of gcc-3.3, trying to combine '-static' with
> '-Wl,-Bdynamic' as linker options to gcc on my alpha results in
> unusable binaries that have an embedded linker path of /usr/lib/ld.so
> instead of /lib/ld-linux.so.2.  If I use '-Wl,-Bstatic' and
> '-Wl,-Bdynamic' instead, the resulting output is sane, so this looks
> like a problem with gcc's invocation of ld.

Binutils doesn't know where the dynamic linker is.  GCC tells it, but
only if you tell GCC that you're using dynamic linking by not
specifying -static.  This isn't the only change - you'll get different
startfiles, for instance, and you may get a different selection of
-lgcc_s/-lgcc/-lgcc_eh.

What are you trying to accomplish by lying to GCC about your link?

-- 
Daniel Jacobowitz



Reply to: