diff options
author | kan <kan@FreeBSD.org> | 2002-12-05 16:58:31 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2002-12-05 16:58:31 +0000 |
commit | f7319be8e1ffaf2c977533b84cb18ef9d731bd5e (patch) | |
tree | cb22b9ffc18a2aae38001aec71294651ef9dd0ff /libexec/rtld-elf/sparc64 | |
parent | aeec108485e3c3aebc1e26ecb6dd421a903c53ff (diff) | |
download | FreeBSD-src-f7319be8e1ffaf2c977533b84cb18ef9d731bd5e.zip FreeBSD-src-f7319be8e1ffaf2c977533b84cb18ef9d731bd5e.tar.gz |
Fix rtld to handle SPARC_R_UA{16,64} relocations correctly.
Approved by: re (rwatson)
Diffstat (limited to 'libexec/rtld-elf/sparc64')
-rw-r--r-- | libexec/rtld-elf/sparc64/reloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c index 1300065..e4c78b6 100644 --- a/libexec/rtld-elf/sparc64/reloc.c +++ b/libexec/rtld-elf/sparc64/reloc.c @@ -178,7 +178,7 @@ static long reloc_target_bitmask[] = { _BM(22), _BM(10), _BM(22), /* _PC_HH22, _PC_HM10, _PC_LM22 */ _BM(16), _BM(19), /* _WDISP16, _WDISP19 */ -1, /* GLOB_JMP */ - _BM(7), _BM(5), _BM(6) /* _7, _5, _6 */ + _BM(7), _BM(5), _BM(6), /* _7, _5, _6 */ -1, -1, /* DISP64, PLT64 */ _BM(22), _BM(13), /* HIX22, LOX10 */ _BM(22), _BM(10), _BM(13), /* H44, M44, L44 */ @@ -380,7 +380,7 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rela *rela, SymCache *cache) /* Write it back out. */ for (i = 0; i < size; i++) - ptr[i] = ((tmp >> (8 * i)) & 0xff); + ptr[i] = ((tmp >> ((size - i - 1) * 8)) & 0xff); } else if (RELOC_TARGET_SIZE(type) > 32) { *where &= ~mask; *where |= value; |