From e1d559f337de2c8ab68a6749dfe873477c883807 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 2 Nov 2019 20:04:02 +0100 Subject: 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 --- sysdeps/generic/ldsodefs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index a6991f3ac7..923bd4cf36 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -1174,7 +1174,13 @@ rtld_active (void) initialized and active ld.so copy. */ return GLRO(dl_init_all_dirs) != NULL; } -#endif + +static inline struct auditstate * +link_map_audit_state (struct link_map *l, size_t index) +{ + return &l->l_audit[index]; +} +#endif /* SHARED */ __END_DECLS -- cgit v1.2.3