Commit a4ee2897 authored by Moritz Angermann's avatar Moritz Angermann

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
parent d0c5d8de
......@@ -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;
......
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