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 Thu, Sep 13, 2012 at 09:50:20PM -0400, Carlos O'Donell wrote:
> On 9/13/2012 9:26 PM, Dmitry V. Levin wrote:
> > Run time dynamic linker used to allow processing itself in verify, list
> > and trace modes until commit glibc-2.14~10 disallowed all kinds of self
> > loading altogether.  This change limits the check for self loading to
> > normal mode so that instruments like ldd could handle rtld properly.
> 
> I like where this patch is going, but you are missing some more information.
> 
> (a) Why was this disabled? What has changed since then that would make
>     it meaningful to enable today?

I suppose the author of commit glibc-2.14~10 had an idea to fix a segfault
that used to happen when rtld was loading itself in normal mode.
Unfortunately, he disallowed too much, so his change not only fixed the
segfault but also introduced the regression reported in #14579.

> (b) What use case does this enable? Is it actually useful to run ldd 
>     against the loader? Why?

Our build system uses scripts that process ELF objects (including rtld),
and these scripts honor ldd exit status (as good scripts must do).
After all, ld.so --verify is not expected to fail with exit status 127
(which meant to be a fatal error) when there is no error at all.

> (c) Testcase?

My glibc package simply won't build without this fix, but I'm afraid this
wouldn't count here. :)

You mean some elf/tst-rtldload.sh script that would test $(objpfx)ld.so
self loading in all four modes?


-- 
ldv

Attachment: pgp00000.pgp
Description: PGP signature


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