From: sewardj Date: Tue, 21 Aug 2001 15:22:09 +0000 (+0000) Subject: [project @ 2001-08-21 15:22:09 by sewardj] X-Git-Tag: Approximately_9120_patches~1144 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f87914660f07f6915eaa7e31c195b77c71b95391;hp=961efb905590c33fb8660876269b336a3dcc9d85;p=ghc-hetmet.git [project @ 2001-08-21 15:22:09 by sewardj] Handle the R_SPARC_UA32 relocation type, as reported by Armin Groesslinger. /* According to the Sun documentation: R_SPARC_UA32 This relocation type resembles R_SPARC_32, except it refers to an unaligned word. That is, the word to be relocated must be treated as four separate bytes with arbitrary alignment, not as a word aligned according to the architecture requirements. (JRS: which means that freeloading on the R_SPARC_32 case is probably wrong, but hey ...) */ --- diff --git a/ghc/rts/Linker.c b/ghc/rts/Linker.c index f60899a..e4d2d07 100644 --- a/ghc/rts/Linker.c +++ b/ghc/rts/Linker.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Linker.c,v 1.58 2001/08/15 08:57:31 simonmar Exp $ + * $Id: Linker.c,v 1.59 2001/08/21 15:22:09 sewardj Exp $ * * (c) The GHC Team, 2000 * @@ -1825,6 +1825,17 @@ do_Elf32_Rela_relocations ( ObjectCode* oc, char* ehdrC, w1 |= w2; *pP = w1; break; + /* According to the Sun documentation: + R_SPARC_UA32 + This relocation type resembles R_SPARC_32, except it refers to an + unaligned word. That is, the word to be relocated must be treated + as four separate bytes with arbitrary alignment, not as a word + aligned according to the architecture requirements. + + (JRS: which means that freeloading on the R_SPARC_32 case + is probably wrong, but hey ...) + */ + case R_SPARC_UA32: case R_SPARC_32: w2 = (Elf32_Word)(S + A); *pP = w2;