1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

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>
This commit is contained in:
Szabolcs Nagy
2020-10-28 15:17:06 +00:00
parent 38a3836011
commit c00452d775
6 changed files with 21 additions and 18 deletions

View File

@ -37,15 +37,15 @@ _dl_open_check (struct link_map *m)
}
static inline void __attribute__ ((always_inline))
_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)
{
}
/* Called for each property in the NT_GNU_PROPERTY_TYPE_0 note of L,
processing of the properties continues until this returns 0. */
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;
}