summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/Dwarf.hs
diff options
context:
space:
mode:
authorPeter Wortmann <scpmw@leeds.ac.uk>2014-12-18 21:11:23 +0100
committerAustin Seipp <austin@well-typed.com>2014-12-18 20:54:37 -0600
commitf85db7567210bc2ff7036064a26d6ba29998f025 (patch)
treea83b26055b1958c10cfc5c94e92799593c02822e /compiler/nativeGen/Dwarf.hs
parent4c02b6f5dc4385369aa62160acd6037a32922f84 (diff)
downloadhaskell-f85db7567210bc2ff7036064a26d6ba29998f025.tar.gz
Some Dwarf generation fixes
- Make abbrev offset absolute on Non-Mac systems - Add another termination byte at the end of the abbrev section (readelf complains) - Scope combination was wrong for the simpler cases - Shouldn't have a "global/" in front of all scopes
Diffstat (limited to 'compiler/nativeGen/Dwarf.hs')
-rw-r--r--compiler/nativeGen/Dwarf.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/nativeGen/Dwarf.hs b/compiler/nativeGen/Dwarf.hs
index 4f9bdb64af..70fca4fdb7 100644
--- a/compiler/nativeGen/Dwarf.hs
+++ b/compiler/nativeGen/Dwarf.hs
@@ -83,8 +83,8 @@ compileUnitHeader unitU = sdocWithPlatform $ \plat ->
in vcat [ ptext (sLit "\t.long ") <> length -- compilation unit size
, ppr cuLabel <> colon
, ptext (sLit "\t.word 3") -- DWARF version
- , pprDwWord (ptext dwarfAbbrevLabel <> char '-' <>
- ptext dwarfAbbrevLabel) -- pointer to our abbrevs
+ , pprDwWord (sectionOffset dwarfAbbrevLabel dwarfAbbrevLabel)
+ -- abbrevs offset
, ptext (sLit "\t.byte ") <> ppr (platformWordSize plat) -- word size
]