diff options
| author | Thomas Moestl <tmm@FreeBSD.org> | 2002-12-02 18:56:30 +0000 |
|---|---|---|
| committer | Thomas Moestl <tmm@FreeBSD.org> | 2002-12-02 18:56:30 +0000 |
| commit | df9f4fead8cf6a8971db641d40a247acb0002ff9 (patch) | |
| tree | 057f022ecd75e843b2aa8456ec10a9f3e67b77fa /sys | |
| parent | 2e84ab947d9c82dbe4c1e35b2ff57e1feb5b6217 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/sparc64/sparc64/elf_machdep.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/sys/sparc64/sparc64/elf_machdep.c b/sys/sparc64/sparc64/elf_machdep.c index e4860c857de1e..592be485356e9 100644 --- a/sys/sparc64/sparc64/elf_machdep.c +++ b/sys/sparc64/sparc64/elf_machdep.c @@ -240,7 +240,6 @@ int elf_reloc(linker_file_t lf, const void *data, int type) { const Elf_Rela *rela; - const Elf_Sym *sym; Elf_Addr relocbase; Elf_Half *where32; Elf_Addr *where; @@ -272,24 +271,10 @@ elf_reloc(linker_file_t lf, const void *data, int type) value = rela->r_addend; if (RELOC_RESOLVE_SYMBOL(rtype)) { - /* - * Work around what appears to be confusion between binutils - * and the v9 ABI. LO10 and HI22 relocations are listed as - * S + A, but for STB_LOCAL symbols it seems that the value - * in the Elf_Sym refered to by the symbol index is wrong, - * instead the value is in the addend field of the Elf_Rela - * record. So if the symbol is local don't look it up, just - * use the addend as its value and add in the relocbase. - */ - sym = elf_get_sym(lf, symidx); - if (ELF_ST_BIND(sym->st_info) == STB_LOCAL) - value += relocbase; - else { - addr = elf_lookup(lf, symidx, 1); - if (addr == 0) - return (-1); - value += addr; - } + addr = elf_lookup(lf, symidx, 1); + if (addr == 0) + return (-1); + value += addr; } if (RELOC_PC_RELATIVE(rtype)) |
