[commit: ghc] wip/aarch64-regd: WIP (f6871eb)

git at git.haskell.org git at git.haskell.org
Sun Oct 25 03:29:13 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/aarch64-regd
Link       : http://ghc.haskell.org/trac/ghc/changeset/f6871eb8f5c15d1e28bb667f52e57fa8d9cfa933/ghc

>---------------------------------------------------------------

commit f6871eb8f5c15d1e28bb667f52e57fa8d9cfa933
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date:   Fri Oct 23 15:54:28 2015 +1100

    WIP


>---------------------------------------------------------------

f6871eb8f5c15d1e28bb667f52e57fa8d9cfa933
 rts/Linker.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index 92df43f..ae3c72e 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -6206,7 +6206,7 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
    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)
+#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(ia64_HOST_ARCH) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) || defined(aarch64_HOST_ARCH)
    /* This #ifdef only serves to avoid unused-var warnings. */
    Elf_Addr targ = (Elf_Addr) oc->sections[target_shndx].start;
 #endif
@@ -6224,7 +6224,7 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
    }
 
    for (j = 0; j < nent; j++) {
-#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(ia64_HOST_ARCH) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH)
+#if defined(DEBUG) || defined(sparc_HOST_ARCH) || defined(ia64_HOST_ARCH) || defined(powerpc_HOST_ARCH) || defined(x86_64_HOST_ARCH) || defined(aarch64_HOST_ARCH)
       /* This #ifdef only serves to avoid unused-var warnings. */
       Elf_Addr  offset = rtab[j].r_offset;
       Elf_Addr  P      = targ + offset;
@@ -6516,6 +6516,16 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
       }
 #endif
 
+	case R_AARCH64_ABS64:
+          puts ("R_AARCH64_ABS64");
+          *(Elf64_Xword *)P = S + A;
+          break;
+
+	case R_AARCH64_ADR_PREL_PG_HI21:
+            puts ("AArch64: unhandled ELF relocation(RelA) R_AARCH64_ADR_PREL_PG_HI21");
+            break;
+
+
          default:
             errorBelch("%s: unhandled ELF relocation(RelA) type %" FMT_Word "\n",
                   oc->fileName, (W_)ELF_R_TYPE(info));



More information about the ghc-commits mailing list