From b2c5e4ce5c44a7be7c2b81c2600cae40c5b225ad Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Thu, 18 Aug 2016 18:16:01 +0100 Subject: Revert "codeGen: Remove binutils<2.17 hack, fixes T11758" This reverts commit e3e2e49a8f6952e1c8a19321c729c17b294d8c92. I'm reverting because it makes ghc-stage2 seg-fault on 64-bit Windows machines. Even ghc-stage2 --version seg-faults. --- includes/rts/storage/InfoTables.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'includes') diff --git a/includes/rts/storage/InfoTables.h b/includes/rts/storage/InfoTables.h index e6bd15c887..fb14ac5821 100644 --- a/includes/rts/storage/InfoTables.h +++ b/includes/rts/storage/InfoTables.h @@ -15,6 +15,17 @@ Several pointer fields in info tables are expressed as offsets relative to the info pointer, so that we can generate position-independent code. + + Note [x86-64-relative] + There is a complication on the x86_64 platform, where pointers are + 64 bits, but the tools don't support 64-bit relative relocations. + However, the default memory model (small) ensures that all symbols + have values in the lower 2Gb of the address space, so offsets all + fit in 32 bits. Hence we can use 32-bit offset fields. + + Somewhere between binutils-2.16.1 and binutils-2.16.91.0.6, + support for 64-bit PC-relative relocations was added, so maybe this + hackery can go away sometime. ------------------------------------------------------------------------- */ #if x86_64_TARGET_ARCH -- cgit v1.2.1