Symbols in -ddump-asm output don't match real output
Symbols in the .s files generated by NCG are properly Z-encoded, but they aren't in the -ddump-asm output. One trivial example:
{-# OPTIONS_GHC -ddump-to-file -ddump-asm -keep-s-files #-}
module Fact where
fact :: Int -> Int
fact 0 = 1
fact n = n * fact (n - 1)
The contents of Fact.s:
.section .rdata
.align 1
.align 1
r23Y_bytes:
.asciz "main"
.section .data
.align 8
.align 1
r24i_closure:
.quad ghczmprim_GHCziTypes_TrNameS_con_info
.quad r23Y_bytes
...
The contents of Fact.dump-asm:
==================== Asm code ====================
2018-03-23 14:00:27.8082773 UTC
.section .rdata
.align 1
.align 1
$trModule1_r23Y_bytes:
.asciz "main"
==================== Asm code ====================
2018-03-23 14:00:27.8172758 UTC
.section .data
.align 8
.align 1
$trModule2_r24i_closure:
.quad GHC.Types.TrNameS_con_info
.quad $trModule1_r23Y_bytes
...
This is confirmed on multiple GHC versions, up to 8.5.
Trac metadata
Trac field | Value |
---|---|
Version | 8.5 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (NCG) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |