glibc/sysdeps/hppa
Adhemerval Zanella 4dca2d3a7b hppa: Fix bind-now audit (BZ #28857)
On hppa, a function pointer returned by la_symbind is actually a function
descriptor has the plabel bit set (bit 30).  This must be cleared to get
the actual address of the descriptor.  If the descriptor has been bound,
the first word of the descriptor is the physical address of theA function,
otherwise, the first word of the descriptor points to a trampoline in the
PLT.

This patch also adds a workaround on tests because on hppa (and it seems
to be the only ABI I have see it), some shared library adds a dynamic PLT
relocation to am empty symbol name:

$ readelf -r elf/tst-audit25mod1.so
[...]
Relocation section '.rela.plt' at offset 0x464 contains 6 entries:
 Offset     Info    Type            Sym.Value  Sym. Name + Addend
00002008  00000081 R_PARISC_IPLT                508
[...]

It breaks some assumptions on the test, where a symbol with an empty
name ("") is passed on la_symbind.

Checked on x86_64-linux-gnu and hppa-linux-gnu.

(cherry picked from commit 9e94f57484)
2022-04-12 13:33:17 -04:00
..
bits
fpu
hppa1.1
nptl
__longjmp.c
abort-instr.h
add_n.S
bsd-_setjmp.S
bsd-setjmp.S
configure
configure.ac
crti.S
crtn.S
dl-fptr.c hppa: Fix warnings from _dl_lookup_address 2022-03-06 16:04:32 +00:00
dl-fptr.h
dl-irel.h
dl-lookupcfg.h hppa: Fix bind-now audit (BZ #28857) 2022-04-12 13:33:17 -04:00
dl-machine.h elf: Fix dynamic-link.h usage on rtld.c 2022-04-08 14:18:11 -04:00
dl-runtime.c elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
dl-runtime.h hppa: Fix warnings from _dl_lookup_address 2022-03-06 16:04:32 +00:00
dl-symaddr.c
dl-tls.h
dl-trampoline.S elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
elf-initfini.h
entry.h
gccframe.h
get-rounding-mode.h
jmpbuf-offsets.h
jmpbuf-unwind.h
ldsodefs.h
libc-tls.c
libgcc-compat.c
linkmap.h
lshift.S
machine-gmon.h
Makefile
math-tests-snan-payload.h
memusage.h
mp_clz_tab.c
nan-high-order-bit.h
preconfigure
rshift.S
setjmp.S
shlib-versions
sotruss-lib.c
stackinfo.h
start.S
sub_n.S
sysdep.h
tininess.h
tls-macros.h
tst-audit.h
udiv_qrnnd.S
Versions