Using a different dynamic linker at compile-time vs. run-time

Nick Clifton nickc@redhat.com
Mon Oct 24 15:45:00 GMT 2011


Hi Pat,

> Specifically, I have a copy of the compiler, linker, etc. from Red Hat
> Enterprise Linux 4.x, and I want to run that toolchain on a newer
> platform in order to generate RHEL 4 binaries.

Really if you are using these tools you should be talking to Red Hat 
about how to solve the problem...


> I want to tell the linker to use /oldroot/lib64/ld-linux-x86-64.so.2
> as the dynamic linker at compile time, but I still want
> "/lib64/ld-linux-x86-64.so.2" to appear in the ELF header of the
> resulting executable (so that the "system" dynamic linker is used at
> run time).

> So, am I missing an option to GNU ld?

No, there isn't one. :-(

>  If not, is this a feature the
> binutils maintainers would be willing to contemplate?

Certainly.  It sounds like something that would be useful to add to 
elfedit...

Cheers
   Ncik




More information about the Binutils mailing list