aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2021-06-21 10:51:05 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-08-05 19:45:19 +0100
commit7880bbd37436b0acd01936b7ba143d1f13634e85 (patch)
treee7dd146b59e569f656933857dfa30f5b3f0eb26a /elf
parentd63bc8be874f42090f3a7a51441221863b83f149 (diff)
downloadglibc-7880bbd37436b0acd01936b7ba143d1f13634e85.zip
glibc-7880bbd37436b0acd01936b7ba143d1f13634e85.tar.gz
glibc-7880bbd37436b0acd01936b7ba143d1f13634e85.tar.bz2
cheri: elf: Use elfptr_t in _dl_protect_relro
start/end should be capabilities now that l_addr is a capability.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-reloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 756bf95..abc7247 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -353,10 +353,10 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
void
_dl_protect_relro (struct link_map *l)
{
- ElfW(Addr) start = ALIGN_DOWN((l->l_addr
+ elfptr_t start = ALIGN_DOWN((l->l_addr
+ l->l_relro_addr),
GLRO(dl_pagesize));
- ElfW(Addr) end = ALIGN_DOWN((l->l_addr
+ elfptr_t end = ALIGN_DOWN((l->l_addr
+ l->l_relro_addr
+ l->l_relro_size),
GLRO(dl_pagesize));