]> 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>
Sun, 6 Mar 2022 15:56:57 +0000 (15:56 +0000)
commit3be79b72d556e3ac37075ad6b99eb5eac18e1402
tree5ca757a2cb52aef31d9bdfbeda75c1a10be86765
parent852361b5a32fafb1aafb6467c7c567063fd99d44
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.
sysdeps/hppa/dl-machine.h