[commit: ghc] master: Adds x86 NONE relocation type (a4ee289)

git at git.haskell.org git at git.haskell.org
Tue Oct 3 05:01:32 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a4ee28978acbcf68da9dfb6f198cb6e1ff38ccca/ghc

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

commit a4ee28978acbcf68da9dfb6f198cb6e1ff38ccca
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Tue Oct 3 09:58:35 2017 +0800

    Adds x86 NONE relocation type
    
    Summary:
    As reported by Alex Lang, R_X86_64_NONE relocations
    appear in per-package object files, not per-module object
    files. This diff adds _NONE relocations for x86.
    
    Reviewers: bgamari, geekosaur, austin, erikd, simonmar
    
    Reviewed By: geekosaur
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D4062


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

a4ee28978acbcf68da9dfb6f198cb6e1ff38ccca
 rts/linker/Elf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/rts/linker/Elf.c b/rts/linker/Elf.c
index 58fa593..f2fd88f 100644
--- a/rts/linker/Elf.c
+++ b/rts/linker/Elf.c
@@ -1097,6 +1097,7 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
 
        switch (reloc_type) {
 #        ifdef i386_HOST_ARCH
+       case COMPAT_R_386_NONE:                  break;
        case COMPAT_R_386_32:   *pP = value;     break;
        case COMPAT_R_386_PC32: *pP = value - P; break;
 #        endif
@@ -1571,6 +1572,9 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
 #        endif
 
 #if defined(x86_64_HOST_ARCH)
+      case COMPAT_R_X86_64_NONE:
+          break;
+
       case COMPAT_R_X86_64_64:
           *(Elf64_Xword *)P = value;
           break;



More information about the ghc-commits mailing list