[commit: ghc] master: rts/Linker.c : Fix armhf build (#10977) (4d6844a)
git at git.haskell.org
git at git.haskell.org
Fri Oct 16 08:45:04 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/4d6844a54f1fc72b3ba31f1b6e09991add816875/ghc
>---------------------------------------------------------------
commit 4d6844a54f1fc72b3ba31f1b6e09991add816875
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date: Fri Oct 16 17:00:43 2015 +1100
rts/Linker.c : Fix armhf build (#10977)
Test Plan: Validate on x86_64, PowerPC and Arm
Reviewers: simonmar, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1330
GHC Trac Issues: #10977
>---------------------------------------------------------------
4d6844a54f1fc72b3ba31f1b6e09991add816875
rts/Linker.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/rts/Linker.c b/rts/Linker.c
index af07fda..173b90d 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -6192,18 +6192,15 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
int nent = shdr[shnum].sh_size / sizeof(Elf_Rela);
int symtab_shndx = shdr[shnum].sh_link;
int strtab_shndx = shdr[symtab_shndx].sh_link;
+ int target_shndx = shdr[shnum].sh_info;
#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(ia64_HOST_ARCH) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH)
/* This #ifdef only serves to avoid unused-var warnings. */
- Elf_Addr targ;
- int target_shndx = shdr[shnum].sh_info;
+ Elf_Addr targ = (Elf_Addr) oc->sections[target_shndx].start;
#endif
stab = (Elf_Sym*) (ehdrC + shdr[ symtab_shndx ].sh_offset);
strtab= (char*) (ehdrC + shdr[ strtab_shndx ].sh_offset);
-#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(ia64_HOST_ARCH) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH)
- /* This #ifdef only serves to avoid set-but-not-used warnings */
- targ = (Elf_Addr) oc->sections[target_shndx].start;
-#endif
+
IF_DEBUG(linker,debugBelch( "relocations for section %d using symtab %d\n",
target_shndx, symtab_shndx ));
More information about the ghc-commits
mailing list