bug-binutils
[Top][All Lists]
Advanced

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

Re: ld fails when ld.so is an executable


From: Alan Modra
Subject: Re: ld fails when ld.so is an executable
Date: Sat, 8 May 2004 14:17:47 +0930
User-agent: Mutt/1.4i

On Fri, May 07, 2004 at 08:46:07PM +0200, Robert Millan wrote:
>  - Glibc's ld.so works as shared object, but also as executable (needed
>    for some extra features like ldd).
>  - kernel of FreeBSD will refuse to exec() ld.so unless it was linked as an
>    executable.

Perhaps you could write a little wrapper executable to accomplish the
same thing as running ld.so directly.  Or keep two copies of ld.so
around, one an ET_DYN for the linker, one munged to ET_EXEC for ldd.

I would also accept a clean patch to implement an elf_backend_object_p
for freebsd to twiddle bfd->flags from EXEC_P to DYNAMIC for the special
case of ld.so.  That's about all you'd need to do to have the linker
work as you wish.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]