-- HACK: On x86_64 binutils<2.17 is only able to generate PC32 -- relocations, hence we only get 32-bit offsets in the jump -- table. As these offsets are always negative we need to properly -- sign extend them to 64-bit. This hack should be removed in -- conjunction with the hack in PprMach.hs/pprDataItem once -- binutils 2.17 is standard.
This bug is intended for house keeping.
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
I have just (2015/03/03) written a shell script (attached) that tests for binutils support for 64 bit pc-relative relocatons. The test passes on *all* modern linux systems, but fails on Mac OSX (Mavericks) and OpenBSD 5.5 (current is 5.6). The failure is one OpenBSD says:
linkasm.s:3: Error: can not do 8 byte pc-relative relocation
OpenBSD has GNU binutils 2.15 but they are unlikely to upgrade to a later version because later versions are under GPLv3 instead of GPLv2. However, they may at some stage switch to some other linker.
OSX has the linker from LLVM which theoretically could be fixed.
I would not be surprised if it was better (equal or faster performance and smaller object file size) to use 32-bit offsets anyways, has anyone done a performance test?
Oh, I see the jump table entries are currently padded to 64 bits anyways. So then it should be slightly better to use a 64-bit relocation instead, but maybe it would be even better to pack the entries into 32 bits instead.