This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: How is ld-linux.so.2 [re]located?
On Sat, Mar 26, 2011 at 1:13 PM, Nix wrote:
> On 22 Mar 2011, Mike Frysinger verbalised:
>> On Tue, Mar 22, 2011 at 10:21 AM, Siddhesh Poyarekar wrote:
>>> You can specify the dynamic linker you want to load your binary with
>>> during the build phase by using the --dynamic-linker ld flag. You can
>>> set LDFLAGS as:
>>>
>>> -Wl,--dynamic-linker=/opt/lib/....
>>>
>>> or similar during your gcc build.
>>
>> yes, but it sounded like that wouldnt work for him as he was dealing
>> with only prebuilt legacy packages
>
> You can still generate a specs file and use that. -dumpspecs is an
> old, old option. (Indeed compilers as old as GCC 2.96 used external
> specs files at all times, so Tom probably just needs to find the specs
> file that's already there in the GCC 2.96 tooldir and edit it. It will
> almost certainly be using --dynamic-linker already.)
... which still would only be useful for linking new code and not
executing old binaries.
-mike