Commit 4d6844a5 authored by Erik de Castro Lopo's avatar Erik de Castro Lopo

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
parent 78c9deaf
......@@ -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 ));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment