Fix elf/tst-audit2 on hppa
commit2e20cd63c96555d650c525ad5633475e8f11bed4
authorJohn David Anglin <danglin@gcc.gnu.org>
Mon, 14 Feb 2022 15:14:49 +0000 (14 15:14 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Mon, 14 Feb 2022 15:14:49 +0000 (14 15:14 +0000)
tree69ba9abe32164687c822ca8559a5c91184c32103
parent6229aa74fb47af17744d765cc49dbf94d3cefe12
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.
sysdeps/hppa/dl-machine.h