diff options
author | Adam Jackson <ajax@nwnk.net> | 2004-11-09 15:58:41 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2004-11-09 15:58:41 +0000 |
commit | 367b963b6333ee58e197845f1389a95ff26f108e (patch) | |
tree | f99402cc55fd8aabf1af7e3edf5a7c56a54035e3 /hw | |
parent | 50cdff7ee2a1b448da24e85efae02237cff9b6b7 (diff) |
Bug #1765: Add support for R_ALPHA_SREL32 relocations in elfloader.
Originally Debian patch
202_alpha_elfloader_support_R_ALPHA_SREL32.diff. (Falk Hueffner)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/loader/elfloader.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/hw/xfree86/loader/elfloader.c b/hw/xfree86/loader/elfloader.c index dea27f5c3..44e248266 100644 --- a/hw/xfree86/loader/elfloader.c +++ b/hw/xfree86/loader/elfloader.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.2 2004/04/23 19:54:06 eich Exp $ */ +/* $XdotOrg: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.3 2004/10/30 20:33:43 alanc Exp $ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/loader/elfloader.c,v 1.61tsi Exp $ */ /* @@ -1609,6 +1609,20 @@ Elf_RelocateEntry(ELFModulePtr elffile, Elf_Word secn, Elf_Rel_t *rel, break; } + case R_ALPHA_SREL32: + { + dest32 = (unsigned int *)(secp + rel->r_offset); + symval += rel->r_addend; + symval -= (unsigned long) dest32; + if ((long)symval >= 0x80000000 + || (long)symval < -(long)0x80000000) + FatalError("R_ALPHA_SREL32 overflow for %s: %lx\n", + ElfGetSymbolName(elffile, ELF_R_SYM(rel->r_info)), + symval); + *dest32 = symval; + break; + } + #endif /* alpha */ #if defined(__mc68000__) case R_68K_32: |