[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ld fails when ld.so is an executable
From: |
Robert Millan |
Subject: |
Re: ld fails when ld.so is an executable |
Date: |
Sat, 8 May 2004 19:03:14 +0200 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On Sat, May 08, 2004 at 02:17:47PM +0930, Alan Modra wrote:
> 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.
I'll try to do that.
Thanks
--
Robert Millan
"[..] but the delight and pride of Aule is in the deed of making, and in the
thing made, and neither in possession nor in his own mastery; wherefore he
gives and hoards not, and is free from care, passing ever on to some new work."
-- J.R.R.T., Ainulindale (Silmarillion)