[DHG_packages] 01/01: ghc: add upstream patch "Add relocation type R_X86_64_REX_GOTPCRELX"

Clint Adams clint at moszumanska.debian.org
Sat Dec 17 02:49:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

clint pushed a commit to branch master
in repository DHG_packages.

commit a804308794a1c95ca2059122226f85eb43f04799
Author: Clint Adams <clint at debian.org>
Date:   Fri Dec 16 21:45:23 2016 -0500

    ghc: add upstream patch "Add relocation type R_X86_64_REX_GOTPCRELX"
---
 p/ghc/debian/changelog                      |  6 ++++
 p/ghc/debian/patches/R_X86_64_REX_GOTPCRELX | 45 +++++++++++++++++++++++++++++
 p/ghc/debian/patches/series                 |  1 +
 3 files changed, 52 insertions(+)

diff --git a/p/ghc/debian/changelog b/p/ghc/debian/changelog
index 3fe039c..c4265d5 100644
--- a/p/ghc/debian/changelog
+++ b/p/ghc/debian/changelog
@@ -1,3 +1,9 @@
+ghc (8.0.1-17) unstable; urgency=medium
+
+  * Add upstream patch "Add relocation type R_X86_64_REX_GOTPCRELX".
+
+ -- Clint Adams <clint at debian.org>  Fri, 16 Dec 2016 21:44:45 -0500
+
 ghc (8.0.1-16) unstable; urgency=medium
 
   * Patch to fix SMP support enablement on armhf.
diff --git a/p/ghc/debian/patches/R_X86_64_REX_GOTPCRELX b/p/ghc/debian/patches/R_X86_64_REX_GOTPCRELX
new file mode 100644
index 0000000..a0f1dd1
--- /dev/null
+++ b/p/ghc/debian/patches/R_X86_64_REX_GOTPCRELX
@@ -0,0 +1,45 @@
+From 0d963caf40da4391028a3beb95b5082c87985e7d Mon Sep 17 00:00:00 2001
+From: Tamar Christina <tamar at zhox.com>
+Date: Sun, 5 Jun 2016 09:59:05 +0200
+Subject: [PATCH] Add relocation type R_X86_64_REX_GOTPCRELX
+
+Summary:
+Adding support for the `R_X86_64_REX_GOTPCRELX` relocation type.
+This relocation is treated by the linker the same as the `R_X86_64_GOTPCRELX` type
+`G + GOT + A - P` to generate relative offsets to the GOT.
+The `REX` prefix has no influence in this stage.
+
+This is based on https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-r252.pdf
+
+Test Plan: ./validate
+
+Reviewers: erikd, austin, bgamari, simonmar
+
+Reviewed By: erikd
+
+Subscribers: thomie, #ghc_windows_task_force
+
+Differential Revision: https://phabricator.haskell.org/D2303
+
+GHC Trac Issues: #12147
+---
+ rts/Linker.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/rts/Linker.c
++++ b/rts/Linker.c
+@@ -5855,7 +5855,13 @@
+           *(Elf64_Sword *)P = (Elf64_Sword)value;
+ #endif
+           break;
+-
++/* These two relocations were introduced in glibc 2.23 and binutils 2.26.
++    But in order to use them the system which compiles the bindist for GHC needs
++    to have glibc >= 2.23. So only use them if they're defined. */
++#if defined(R_X86_64_REX_GOTPCRELX) && defined(R_X86_64_GOTPCRELX)
++      case R_X86_64_REX_GOTPCRELX:
++      case R_X86_64_GOTPCRELX:
++#endif
+       case R_X86_64_GOTPCREL:
+       {
+           StgInt64 gotAddress = (StgInt64) &makeSymbolExtra(oc, ELF_R_SYM(info), S)->addr;
diff --git a/p/ghc/debian/patches/series b/p/ghc/debian/patches/series
index 14a6c0c..e90f3de 100644
--- a/p/ghc/debian/patches/series
+++ b/p/ghc/debian/patches/series
@@ -14,3 +14,4 @@ x32-use-native-x86_64-insn.patch
 fix-ppc-lwa-generation
 osdecommitmemory-compat.patch
 smp-arm-fix.patch
+R_X86_64_REX_GOTPCRELX

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git



More information about the Pkg-haskell-commits mailing list