mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-06 23:02:10 +03:00
ldso: process RELR only for non-FDPIC archs
the way RELR is applied is not a meaningful operation for FDPIC (there is no single "base" address). it seems unlikely RELR would ever be added for FDPIC, but if it ever is, the behavior and possibly data format will need to be different, so guard against calling the non-FDPIC code.
This commit is contained in:
parent
d32dadd60e
commit
bf99258564
@ -1375,7 +1375,8 @@ static void reloc_all(struct dso *p)
|
||||
2+(dyn[DT_PLTREL]==DT_RELA));
|
||||
do_relocs(p, laddr(p, dyn[DT_REL]), dyn[DT_RELSZ], 2);
|
||||
do_relocs(p, laddr(p, dyn[DT_RELA]), dyn[DT_RELASZ], 3);
|
||||
do_relr_relocs(p, laddr(p, dyn[DT_RELR]), dyn[DT_RELRSZ]);
|
||||
if (!DL_FDPIC)
|
||||
do_relr_relocs(p, laddr(p, dyn[DT_RELR]), dyn[DT_RELRSZ]);
|
||||
|
||||
if (head != &ldso && p->relro_start != p->relro_end) {
|
||||
long ret = __syscall(SYS_mprotect, laddr(p, p->relro_start),
|
||||
|
Loading…
Reference in New Issue
Block a user