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: Robert Millan
Subject: Re: ld fails when ld.so is an executable
Date: Fri, 7 May 2004 20:46:07 +0200
User-agent: Mutt/1.5.5.1+cvs20040105i

On Thu, May 06, 2004 at 09:58:22PM +0930, Alan Modra wrote:
> On Sun, May 02, 2004 at 01:26:43PM +0200, Robert Millan wrote:
> > 
> > If you turn ld.so into an executable, ld will fail to link anything
> > afterwards. According to the ELF standard (section 2-6 in book III),
> > the dynamic linker can be a shared object or an executable, so binutils
> > can't assume either.
> 
> I don't think it is reasonable to expect ld to link ET_EXEC objects.

That rises an incompatibility problem when linking with GNU libc on kernel of
FreeBSD:

 - 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.

This problem is not necessarily specific to kfreebsd, but could also be with
other kernels (likewise, it's reasonable for a kernel to exec() only on
executables)

Either binutils or Glibc needs to be modified in order to support this
combination. I don't really have an opinion on which of them should be.
If you think Glibc is in fault, please add CC to
address@hidden on your response.

-- 
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)




reply via email to

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