diff options
Diffstat (limited to 'libexec/rtld-elf/map_object.c')
-rw-r--r-- | libexec/rtld-elf/map_object.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 6a13692..d240575 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -86,6 +86,8 @@ map_object(int fd, const char *path, const struct stat *sb) Elf_Word stack_flags; Elf_Addr relro_page; size_t relro_size; + Elf_Addr note_start; + Elf_Addr note_end; hdr = get_elf_header(fd, path); if (hdr == NULL) @@ -104,6 +106,8 @@ map_object(int fd, const char *path, const struct stat *sb) phdr_vaddr = 0; relro_page = 0; relro_size = 0; + note_start = 0; + note_end = 0; segs = alloca(sizeof(segs[0]) * hdr->e_phnum); stack_flags = RTLD_DEFAULT_STACK_PF_EXEC | PF_R | PF_W; while (phdr < phlimit) { @@ -143,6 +147,12 @@ map_object(int fd, const char *path, const struct stat *sb) relro_page = phdr->p_vaddr; relro_size = phdr->p_memsz; break; + + case PT_NOTE: + note_start = (Elf_Addr)obj->relocbase + phdr->p_offset; + note_end = note_start + phdr->p_filesz; + digest_notes(obj, note_start, note_end); + break; } ++phdr; |