rts/Linker.c: distinct between DATA and CODE labels when importing
authorSergei Trofimovich <siarheit@google.com>
Tue, 7 Apr 2015 14:08:37 +0000 (09:08 -0500)
committerAustin Seipp <austin@well-typed.com>
Tue, 7 Apr 2015 14:13:22 +0000 (09:13 -0500)
commitab76b0990e9f7d20bde403be38935f9d16491806
treefb43cceb939bc8810bb7131efa92f6216431c531
parent4f8e34822f18cf3d31414676f900b3714367d38e
rts/Linker.c: distinct between DATA and CODE labels when importing

The patch is a last major piece to make unregisterised GHC build
under GCC's link-time optimizer.

Before the patch we imported everything external as functions.
Now we distinct between global variables and functions.

The difference is crucial on ia64 and a complement to fixes:
    > d82f592522eb8e063276a8a8c87ab93e18353c6b
    > CMM: add a mechanism to import C .data labels
    > e18525fae273f4c1ad8d6cbe1dea4fc074cac721
    > pprC: declare extern cmm primitives as functions, not data

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Reviewed By: austin

Differential Revision: https://phabricator.haskell.org/D797
rts/Linker.c