This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Fri, Sep 14, 2012 at 4:07 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> 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.

I see your point, it would be hard to distinguish accurately what
is or is not a dynamic loader without significantly more information.
You can be ET_DYN, have no dependencies (even if that's unlikely),
and not be a dynamic loader.

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]