]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix elf/tst-audit2 on hppa
authorJohn David Anglin <danglin@gcc.gnu.org>
Sun, 6 Mar 2022 15:56:57 +0000 (15:56 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Tue, 8 Mar 2022 13:34:05 +0000 (13:34 +0000)
commitaeab7584c2db99069f4189f1097f5f2c3037157b
tree3661127a5dc075a21c34a07bf1baa91c28917e82
parentf341ab08fc5296f5e6f72e79b1d1c1fe04163f1d
Fix elf/tst-audit2 on hppa

The test elf/tst-audit2 fails on hppa with a segmentation fault in the
long branch stub used to call malloc from calloc.  This occurs because
the test is not a PIC executable and calloc is called from the dynamic
linker before the dp register is initialized in _dl_start_user.

The fix is to move the dp register initialization into
elf_machine_runtime_setup.  Since the address of $global$ can't be
loaded directly, we continue to use the DT_PLTGOT value from the
the main_map to initialize dp.  Since l_main_map is not available
in v2.34 and earlier, we use a new function, elf_machine_main_map,
to find the main map.

(cherry picked from commit 3be79b72d556e3ac37075ad6b99eb5eac18e1402)
sysdeps/hppa/dl-machine.h