[PATCH 3/3] elf: Implement force_first handling in _dl_sort_maps_dfs
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Wed Aug 31 16:37:49 GMT 2022
On 31/08/22 13:37, Adhemerval Zanella Netto wrote:
>
>
> On 15/08/22 11:30, Florian Weimer via Libc-alpha wrote:
>> As documented in a comment _dl_close_worker, the skipping is actually
>> needed for correctness. It also seems less surprising if the
>> just-opened object is always initialized last, even in the presence
>> of cycles.
>
> I think it is BZ#28937, isn't? Also could you extend the explanation as you
> did in the last comment, the initial phrase sounds confusing. Maybe extend
> the comment to say that not _dl_sort_maps_dfs will move the main object to
> front, so where previous you have the maps input as:
>
> maps[0].l_name=elf/tst-bz28937-dir/tst-bz28937-a.so
> maps[1].l_name=[...]/elf/tst-bz28937-dir/tst-bz28937-a1.so
> maps[2].l_name=[...]/elf/tst-bz28937-dir/tst-bz28937-a2.so
> maps[3].l_name=./libc.so.6
> maps[4].l_name=elf/ld.so
>
> It will not be properly sorted as:
It will *now* be ...
More information about the Libc-alpha
mailing list