]> git.ipfire.org Git - thirdparty/glibc.git/commit
elf: Move __rtld_malloc_init_stubs call into _dl_start_final
authorFlorian Weimer <fweimer@redhat.com>
Tue, 24 Sep 2024 11:23:10 +0000 (13:23 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 24 Sep 2024 11:23:10 +0000 (13:23 +0200)
commit2abfa1907218c5ec9d52bb81bee3f1af652f67c7
treef22efdd1ff57848090fd5e79e80f559b75767662
parent9802c0f2fec787ffcd192e1f2d6871dc586c6dad
elf: Move __rtld_malloc_init_stubs call into _dl_start_final

Calling an extern function in a different translation unit before
self-relocation is brittle.  The compiler may load the address
at an earlier point in _dl_start, before self-relocation.  In
_dl_start_final, the call is behind a compiler barrier, so this
cannot happen.
elf/rtld.c