[PATCH] Consolidate object search in DSO in _dl_find_dso_for_object

Andreas Jaeger aj@suse.com
Fri Feb 15 19:13:00 GMT 2013


On 02/15/2013 07:33 PM, Carlos O'Donell wrote:
> On 02/15/2013 06:43 AM, Siddhesh Poyarekar wrote:
>> Hi,
>>
>> As Carlos, suggested, here's a patch to consolidate the object search
>> loop in various places in current code into a separate function.
>> There are only 3 places where this consolidation is needed (4 with
>> __cxa_thread_atexit_impl); the other two have a completely different
>> logic.
>
> Thanks for doing this clean up, I appreciate it.
>
>> Built and regression tested on x86_64.  OK to commit?
>>
>> Siddhesh
>>
>> 	* elf/Versions (ld): Add _dl_find_dso_for_object.
>> 	* elf/dl-addr.c (_dl_addr): Use _dl_find_dso_for_object.
>> 	* elf/dl-open.c (_dl_find_dso_for_object): New function.
>> 	(dl_open_worker): Use _dl_find_dso_for_object.
>> 	* elf/dl-sym.c (do_sym): Likewise.
>> 	* sysdeps/generic/ldsodefs.h: Declare _dl_find_dso_for_object.
>>
>> diff --git a/elf/Versions b/elf/Versions
>> index 87e27c5..97615de 100644
>> --- a/elf/Versions
>> +++ b/elf/Versions
>> @@ -62,5 +62,6 @@ ld {
>>       _dl_debug_state;
>>       # Pointer protection.
>>       __pointer_chk_guard;
>> +    _dl_find_dso_for_object;
>
> While Andreas says the list should be alphabetical it doesn't look like it is :-)
>
> I guess it would be a distinct patch to sort the list first?
>
> How deep does the rabbit hole go?


Indeed, we seem not to be consistent here. Files like dirent/Versions 
are nicely sorted but others are not ;(.

Andreas
-- 
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
   SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126



More information about the Libc-alpha mailing list