summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-01-20 17:38:25 +0000
committerEric Andersen <andersen@codepoet.org>2004-01-20 17:38:25 +0000
commita1994c00a6accfb3dd4531840c91fd589436a953 (patch)
treee3dd4a95ba7e91703defdcfb68a7606efc4f1765
parent3a60d155e30215a564b5fc58d1838c8543461bb9 (diff)
Joakim Tjernlund writes:
> Is there anything I can do/provide that would assist in the solving of > this problem on PowerPC? I'm still concerned about my lack of flash space... Try this path. It fixes the recent ldso problems for me on my mpc860 board. You should be able to use ldso without the dcbx patch to the kernel now. Please report back. Jocke
-rw-r--r--ldso/ldso/powerpc/elfinterp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ldso/ldso/powerpc/elfinterp.c b/ldso/ldso/powerpc/elfinterp.c
index b7b684337..0aaf8f1ab 100644
--- a/ldso/ldso/powerpc/elfinterp.c
+++ b/ldso/ldso/powerpc/elfinterp.c
@@ -472,7 +472,8 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
*reloc_addr = (unsigned long)tpnt->loadaddr + (unsigned long)rpnt->r_addend;
break;
case R_PPC_ADDR32:
- *reloc_addr += symbol_addr;
+ case R_PPC_GLOB_DAT:
+ *reloc_addr = symbol_addr + (unsigned long)rpnt->r_addend;
break;
case R_PPC_ADDR16_HA:
/* XXX is this correct? */
@@ -520,9 +521,6 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct dyn_elf *scope,
}
break;
}
- case R_PPC_GLOB_DAT:
- *reloc_addr += symbol_addr;
- break;
case R_PPC_COPY:
// handled later
return 0;
@@ -591,7 +589,7 @@ _dl_do_copy (struct elf_resolve *tpnt, struct dyn_elf *scope,
symbol_addr, symtab[symtab_index].st_value);
#endif
_dl_memcpy((char *) reloc_addr,
- (char *) symbol_addr, symtab[symtab_index].st_size);
+ (char *) (symbol_addr + (unsigned long)rpnt->r_addend), symtab[symtab_index].st_size);
}
return goof;