diff options
author | Florian Weimer <fweimer@redhat.com> | 2024-11-06 10:33:44 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2024-11-06 10:33:44 +0100 |
commit | f2326c2ec0a0a8db7bc7f4db8cce3002768fc3b6 (patch) | |
tree | 8f64527b3e98cc07de9db2ed61e667e79b754f22 /sysdeps/generic | |
parent | a79642204537dec8a1e1c58d1e0a074b3c624f46 (diff) | |
download | glibc-f2326c2ec0a0a8db7bc7f4db8cce3002768fc3b6.zip glibc-f2326c2ec0a0a8db7bc7f4db8cce3002768fc3b6.tar.gz glibc-f2326c2ec0a0a8db7bc7f4db8cce3002768fc3b6.tar.bz2 |
elf: Introduce _dl_relocate_object_no_relro
And make _dl_protect_relro apply RELRO conditionally.
Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 259ce2e..91447a5 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -1014,6 +1014,13 @@ extern void _dl_relocate_object (struct link_map *map, int reloc_mode, int consider_profiling) attribute_hidden; +/* Perform relocation, but do not apply RELRO. Does not check + L->relocated. Otherwise the same as _dl_relocate_object. */ +void _dl_relocate_object_no_relro (struct link_map *map, + struct r_scope_elem *scope[], + int reloc_mode, int consider_profiling) + attribute_hidden; + /* Protect PT_GNU_RELRO area. */ extern void _dl_protect_relro (struct link_map *map) attribute_hidden; |