[git commit nptl] ldso: fix building for FDPIC systems

Mike Frysinger vapier at gentoo.org
Wed Aug 19 11:29:41 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=cd7ddf7c0eabaf6ed2133af614b99900ef074e77
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl

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 at gentoo.org>
Signed-off-by: Austin Foxley <austinf at cetoncorp.com>
---
 ldso/ldso/ldso.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 0ebde2d..5dbf27e 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);
 				}
-- 
1.6.3.3



More information about the uClibc-cvs mailing list