summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-07-23 04:58:56 -0400
committerAustin Foxley <austinf@cetoncorp.com>2009-08-19 12:40:04 -0700
commitcd7ddf7c0eabaf6ed2133af614b99900ef074e77 (patch)
tree6b6b3ef75f52efd991b4d77fa0de4961604e2f92
parentd36f049e44c74057bf65dcc64293128ff344ec2c (diff)
downloaduClibc-alpine-cd7ddf7c0eabaf6ed2133af614b99900ef074e77.tar.bz2
uClibc-alpine-cd7ddf7c0eabaf6ed2133af614b99900ef074e77.tar.xz
ldso: fix building for FDPIC systems
The force shareable code missed a spot of using the DL_RELOC_ADDR() indirection thus leading to invalid operands: ldso/ldso/ldso.c: In function '_dl_get_ready_to_run': ldso/ldso/ldso.c:409: error: invalid operands to binary + (have 'Elf32_Addr' and 'struct elf32_fdpic_loadaddr') Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
-rw-r--r--ldso/ldso/ldso.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 0ebde2dc1..5dbf27e97 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -440,7 +440,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
for (i = 0; i < auxvt[AT_PHNUM].a_un.a_val; i++, ppnt++) {
if (ppnt->p_type == PT_LOAD && !(ppnt->p_flags & PF_W))
_dl_mprotect((void *) (DL_RELOC_ADDR(app_tpnt->loadaddr, ppnt->p_vaddr) & PAGE_ALIGN),
- ((ppnt->p_vaddr + app_tpnt->loadaddr) & ADDR_ALIGN) +
+ (DL_RELOC_ADDR(app_tpnt->loadaddr, ppnt->p_vaddr) & ADDR_ALIGN) +
(unsigned long) ppnt->p_filesz,
PROT_READ | PROT_WRITE | PROT_EXEC);
}