This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC][BZ #16046] dl_iterate_phdr should not expose internal stub.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: libc-alpha at sourceware dot org, "Maciej W. Rozycki" <macro at codesourcery dot com>
- Date: Fri, 25 Oct 2013 14:03:28 -0700 (PDT)
- Subject: Re: [RFC][BZ #16046] dl_iterate_phdr should not expose internal stub.
- Authentication-results: sourceware.org; auth=none
- References: <20131017174710 dot GA4993 at domone dot podge>
macro should participate in the fix, since it was his change that
introduced the regression.
Firstly, there should be a regression test for this (i.e. a test that
passes under 2.17 and breaks under 2.18).
I don't think that's the best way to implement it. Look at the !SHARED
version of dl_iterate_phdr. It's doing a special case for the main program
because it wasn't in the list. After macro's change, it is in the list.
So it seems cleanest to drop the !SHARED special-case code altogether and
instead fill out _dl_main_map sufficiently so the general-case code dtrt
for it too.
Thanks,
Roland