[project @ 2005-07-11 13:53:24 by simonmar]
authorsimonmar <unknown>
Mon, 11 Jul 2005 13:53:24 +0000 (13:53 +0000)
committersimonmar <unknown>
Mon, 11 Jul 2005 13:53:24 +0000 (13:53 +0000)
commit0af6ff59bae5ea21c75a129e17a563098fae15ed
tree65e18a2633d94844652b7c3d7e783653a5e74648
parentb8105b2b5e5b38c8ce4dca8979f5057c3159cfa0
[project @ 2005-07-11 13:53:24 by simonmar]
GHCi staggers to its feet on x86_64.

The problem is that in the small code model on x86_64, all symbol
relocations are 32-bit, because the program is assumed to fit into
2Gb.  However, shared libraries are linked outside the 2Gb range, and
the linker arranges that references to shared library symbols either
go via a jump table (for code references) or are copied into the 2Gb
area (for data references).

In GHCi's linker, We can use a jump table for the function symbols,
but we can't copy the data symbols because they've already been
relocated to point to the shared library.  What's more, we can't tell
whether a symbol reference is to code or data - this information is
only available from the shared library itself.

Fortunately, at least HSbase.o doesn't have any data references to
shared libraries (at least on the Linux distro I'm using), so I can at
least get GHCi up and limping.
ghc/rts/Linker.c