summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-08 12:36:40 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-08 12:36:40 +0000
commit792d4aa590ebd7049fa6f925173badaae24bd866 (patch)
treef42c6d93b4e445d2fccb91555c9e52dfec5aea8e /ldso
parentbc9ff8040ef8042ba858baf9c28b1825337ce4df (diff)
patch by Jocke to fix up lazy relocation
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/x86_64/elfinterp.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ldso/ldso/x86_64/elfinterp.c b/ldso/ldso/x86_64/elfinterp.c
index 66552d879..8fd0ebba1 100644
--- a/ldso/ldso/x86_64/elfinterp.c
+++ b/ldso/ldso/x86_64/elfinterp.c
@@ -209,7 +209,7 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
case R_X86_64_GLOB_DAT:
case R_X86_64_JUMP_SLOT:
- *reloc_addr = symbol_addr;
+ *reloc_addr = symbol_addr + rpnt->r_addend;
break;
/* handled by elf_machine_relative()
@@ -261,7 +261,6 @@ _dl_do_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
return 0;
}
-#if 0
static int
_dl_do_lazy_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
ELF_RELOC *rpnt, ElfW(Sym) *symtab, char *strtab)
@@ -288,7 +287,7 @@ _dl_do_lazy_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
case R_X86_64_NONE:
break;
case R_X86_64_JUMP_SLOT:
- *reloc_addr = tpnt->loadaddr + symtab[symtab_index].st_value;
+ *reloc_addr += (unsigned long)tpnt->loadaddr;
break;
default:
_dl_exit(1);
@@ -302,17 +301,13 @@ _dl_do_lazy_reloc(struct elf_resolve *tpnt, struct dyn_elf *scope,
return 0;
}
-#endif
void
_dl_parse_lazy_relocation_information(struct dyn_elf *rpnt,
unsigned long rel_addr,
unsigned long rel_size)
{
- _dl_parse_relocation_information(rpnt, rel_addr, rel_size);
-/* jump slot isnt working
(void)_dl_parse(rpnt->dyn, NULL, rel_addr, rel_size, _dl_do_lazy_reloc);
-*/
}
int