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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
fpu Update hppa libm-test-ulps 2021-12-17 23:51:39 +01:00
hppa1.1 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nptl nptl: Move pthread_spin_init, Move pthread_spin_unlock into libc 2021-04-23 17:06:44 +02:00
__longjmp.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
abort-instr.h
add_n.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
configure hppa: assume TLS everywhere 2015-08-18 02:36:31 -04:00
configure.ac hppa: assume TLS everywhere 2015-08-18 02:36:31 -04:00
crti.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
crtn.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-fptr.c hppa: Fix warnings from _dl_lookup_address 2022-03-06 16:04:32 +00:00
dl-fptr.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
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 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-tls.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
dl-trampoline.S elf: Add _dl_audit_pltexit 2022-04-08 14:18:12 -04:00
elf-initfini.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
entry.h hppa: Remove warnings and fix conformance errors. 2015-02-05 21:37:47 -05:00
gccframe.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
get-rounding-mode.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ldsodefs.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libc-tls.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
libgcc-compat.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
lshift.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
machine-gmon.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
math-tests-snan-payload.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
memusage.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mp_clz_tab.c
nan-high-order-bit.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
preconfigure
rshift.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
setjmp.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
shlib-versions Remove configuration name patterns from shlib-versions. 2014-09-12 12:28:47 +00:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
stackinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
start.S Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
sub_n.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
sysdep.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tininess.h
tls-macros.h
tst-audit.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
udiv_qrnnd.S Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions hppa/ia64: _dl_unmap: make it hidden 2015-07-16 09:03:46 -04:00