aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86/dl-prop.h
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2020-10-28 15:17:06 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2020-12-11 15:45:37 +0000
commitc00452d7757a300931ee186d043c43b48eeb0875 (patch)
tree5107070cbfbdd9f3ceb17038986a90e2f4824d0d /sysdeps/x86/dl-prop.h
parent38a3836011f3fe3290a94ab136dcb5f3c5c9f4e2 (diff)
downloadglibc-c00452d7757a300931ee186d043c43b48eeb0875.tar
glibc-c00452d7757a300931ee186d043c43b48eeb0875.tar.gz
glibc-c00452d7757a300931ee186d043c43b48eeb0875.tar.bz2
glibc-c00452d7757a300931ee186d043c43b48eeb0875.zip
elf: Pass the fd to note processing
To handle GNU property notes on aarch64 some segments need to be mmaped again, so the fd of the loaded ELF module is needed. When the fd is not available (kernel loaded modules), then -1 is passed. The fd is passed to both _dl_process_pt_gnu_property and _dl_process_pt_note for consistency. Target specific note processing functions are updated accordingly. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/x86/dl-prop.h')
-rw-r--r--sysdeps/x86/dl-prop.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/x86/dl-prop.h b/sysdeps/x86/dl-prop.h
index 89911e19e2..4eb3b85a7b 100644
--- a/sysdeps/x86/dl-prop.h
+++ b/sysdeps/x86/dl-prop.h
@@ -145,15 +145,15 @@ _dl_process_cet_property_note (struct link_map *l,
}
static inline void __attribute__ ((unused))
-_dl_process_pt_note (struct link_map *l, const ElfW(Phdr) *ph)
+_dl_process_pt_note (struct link_map *l, int fd, const ElfW(Phdr) *ph)
{
const ElfW(Nhdr) *note = (const void *) (ph->p_vaddr + l->l_addr);
_dl_process_cet_property_note (l, note, ph->p_memsz, ph->p_align);
}
static inline int __attribute__ ((always_inline))
-_dl_process_gnu_property (struct link_map *l, uint32_t type, uint32_t datasz,
- void *data)
+_dl_process_gnu_property (struct link_map *l, int fd, uint32_t type,
+ uint32_t datasz, void *data)
{
return 0;
}