Skip to content
  • Peter Trommler's avatar
    Fix PPC NCG after blockID patch · f8e7fece
    Peter Trommler authored and Ben Gamari's avatar Ben Gamari committed
    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
    f8e7fece