aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-sym.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-11-02 20:04:02 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-11-15 13:03:40 +0100
commite1d559f337de2c8ab68a6749dfe873477c883807 (patch)
tree89136f8318e432a07ea7db9fcda976b33ad99086 /elf/dl-sym.c
parentc7bf5ceab6ec776ac7350d3b0190776bf532ac54 (diff)
downloadglibc-e1d559f337de2c8ab68a6749dfe873477c883807.zip
glibc-e1d559f337de2c8ab68a6749dfe873477c883807.tar.gz
glibc-e1d559f337de2c8ab68a6749dfe873477c883807.tar.bz2
Introduce link_map_audit_state accessor function
To improve GCC 10 compatibility, it is necessary to remove the l_audit zero-length array from the end of struct link_map. In preparation of that, this commit introduces an accessor function for the audit state, so that it is possible to change the representation of the audit state without adjusting the code that accesses it. Tested on x86_64-linux-gnu. Built on i686-gnu. Change-Id: Id815673c29950fc011ae5301d7cde12624f658df
Diffstat (limited to 'elf/dl-sym.c')
-rw-r--r--elf/dl-sym.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/elf/dl-sym.c b/elf/dl-sym.c
index 8209342..21e025b 100644
--- a/elf/dl-sym.c
+++ b/elf/dl-sym.c
@@ -198,17 +198,20 @@ RTLD_NEXT used in code not dynamically loaded"));
for (unsigned int cnt = 0; cnt < GLRO(dl_naudit); ++cnt)
{
+ struct auditstate *match_audit
+ = link_map_audit_state (match, cnt);
+ struct auditstate *result_audit
+ = link_map_audit_state (result, cnt);
if (afct->symbind != NULL
- && ((match->l_audit[cnt].bindflags & LA_FLG_BINDFROM)
- != 0
- || ((result->l_audit[cnt].bindflags & LA_FLG_BINDTO)
+ && ((match_audit->bindflags & LA_FLG_BINDFROM) != 0
+ || ((result_audit->bindflags & LA_FLG_BINDTO)
!= 0)))
{
unsigned int flags = altvalue | LA_SYMB_DLSYM;
uintptr_t new_value
= afct->symbind (&sym, ndx,
- &match->l_audit[cnt].cookie,
- &result->l_audit[cnt].cookie,
+ &match_audit->cookie,
+ &result_audit->cookie,
&flags, strtab + ref->st_name);
if (new_value != (uintptr_t) sym.st_value)
{