summaryrefslogtreecommitdiff
path: root/rts/Linker.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/Linker.c')
-rw-r--r--rts/Linker.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index 5a6a8c2d4c..a1f72e5cca 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -5681,7 +5681,13 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
*(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;