Use correct section types syntax for architecture
authorBen Gamari <bgamari.foss@gmail.com>
Tue, 11 Jul 2017 19:41:55 +0000 (15:41 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 11 Jul 2017 20:32:43 +0000 (16:32 -0400)
commit9b9f978fdcd13ff7b2a9b7391e02dff06da622a0
tree23221a07613b0866727026b201778eb5bc3d08b4
parent4befb415d7ee63d2b0ecdc2384310dc4b3ccc90a
Use correct section types syntax for architecture

Previously GHC would always assume that section types began with `@` while
producing assembly, which is not true. For instance, in ARM assembly syntax
section types begin with `%`. This abstracts out section type pretty-printing
and adjusts it to correctly account for the target architectures assembly
flavor.

Reviewers: austin, hvr, Phyx

Reviewed By: Phyx

Subscribers: Phyx, rwbarton, thomie, erikd

GHC Trac Issues: #13937

Differential Revision: https://phabricator.haskell.org/D3712
aclocal.m4
compiler/ghc.cabal.in
compiler/main/DriverPipeline.hs
compiler/main/Elf.hs
compiler/nativeGen/AsmCodeGen.hs
compiler/nativeGen/Dwarf/Constants.hs
compiler/nativeGen/PprBase.hs
compiler/utils/AsmUtils.hs [new file with mode: 0644]