This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Consolidate link map sorting
- From: Florian Weimer <fweimer at redhat dot com>
- To: Andreas Schwab <schwab at suse dot de>, libc-alpha at sourceware dot org
- Date: Sat, 11 Nov 2017 14:06:20 +0100
- Subject: Re: [PATCH] Consolidate link map sorting
- Authentication-results: sourceware.org; auth=none
- References: <mvmshdnpyyj.fsf@suse.de>
On 11/09/2017 10:45 AM, Andreas Schwab wrote:
+ /* Do not handle ld.so in secondary namespaces and object which
+ are not removed. */
+ if (thisp != thisp->l_real || thisp->l_idx == -1)
+ goto skip;
Is this really safe to include in the processing when called from
_dl_map_objects?
Then the comment is wrong, it should say:
“Do not handle ld.so in secondary namespaces and objects which are being
removed.”
I assume thisp->l_idx == -1 means the object is undergoing removal, and
_dl_new_object initializes l_idx to zero by allocating struct link_map
using calloc.
Thanks,
Florian