summaryrefslogtreecommitdiff
path: root/compiler/cmm/BlockId.hs
diff options
context:
space:
mode:
authorPeter Trommler <ptrommler@acm.org>2017-11-09 17:55:01 -0500
committerBen Gamari <ben@smart-cactus.org>2017-11-09 18:31:22 -0500
commitf8e7fece58fa082b8b5a87fb84ffd5d18500d26a (patch)
treead258ef2390459e3bed0ebfd360257fe1d9aefc2 /compiler/cmm/BlockId.hs
parent75291abaf6db7befbde5b4dadaea0b8047a75e06 (diff)
downloadhaskell-f8e7fece58fa082b8b5a87fb84ffd5d18500d26a.tar.gz
Fix PPC NCG after blockID patch
Commit rGHC8b007ab assigns the same label to the first basic block of a proc and to the proc entry point. This violates the PPC 64-bit ELF v. 1.9 and v. 2.0 ABIs and leads to duplicate symbols. This patch fixes duplicate symbols caused by block labels In commit rGHCd7b8da1 an info table label is generated from a block id. Getting the entry label from that info label leads to an undefined symbol because a suffix "_entry" that is not present in the block label. To fix that issue add a new info table label flavour for labels derived from block ids. Converting such a label with toEntryLabel produces the original block label. Fixes #14311 Test Plan: ./validate Reviewers: austin, bgamari, simonmar, erikd, hvr, angerman Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #14311 Differential Revision: https://phabricator.haskell.org/D4149
Diffstat (limited to 'compiler/cmm/BlockId.hs')
-rw-r--r--compiler/cmm/BlockId.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/cmm/BlockId.hs b/compiler/cmm/BlockId.hs
index 478affefbf..d2e0161d69 100644
--- a/compiler/cmm/BlockId.hs
+++ b/compiler/cmm/BlockId.hs
@@ -43,4 +43,5 @@ blockLbl :: BlockId -> CLabel
blockLbl label = mkAsmTempLabel (getUnique label)
infoTblLbl :: BlockId -> CLabel
-infoTblLbl label = mkInfoTableLabel (mkFCallName (getUnique label) "block") NoCafRefs
+infoTblLbl label
+ = mkBlockInfoTableLabel (mkFCallName (getUnique label) "block") NoCafRefs