[PATCH] [BZ #14579] rtld: limit the self loading check to normal mode

Roland McGrath roland@hack.frob.com
Fri Sep 14 20:08:00 GMT 2012


> Is having a dynamic section the only qualifier for being labelled as a
> dynamically inked object? Conceptually I've always been calling the
> dynamic linker "statically linked", but I know that such a name is
> neither correct nor precise.

It's ET_DYN, not ET_EXEC.  It has a PT_DYNAMIC.  Pick your poison.

> I agree that we *should* be able to handle it, but I don't know that we can
> call it a "dynamically linked object we can handle." I don't know that we can
> chain-load from one loader to another. I would expect it to work, but purely
> at a theoretical level.

I actually only meant "we can handle" in the sense of --list working.  But
we should also be fine in terms of "load and relocate it".  Perhaps you can
actually run it, but it doesn't really matter.  If it doesn't work, it's
just because of what the code of the loaded object does in its entry point,
which is not relevant to whether the dynamic linker can "handle" it.

> >> Does your patch cause ld.so --verify to return 1 as it does for statically
> >> linked binaries?
> > 
> > It returns 2, but --list says "statically linked".
>  
> Would be nice if it return 1 and said "dyanmic loader".

I don't agree.  There is nothing deeply special about the dynamic linker.
It's just an ET_DYN object like any shared library.  ldd et al should treat
it just like those.



More information about the Libc-alpha mailing list