updated test so 'x' is relative to file-offset not segment offset

This commit is contained in:
nc 2019-07-11 22:21:32 -04:00
parent c2725b65b3
commit 2805308785

View File

@ -678,7 +678,7 @@ test-compute-offsets:
# segment 'code' has size 0x5
# segment 'data' is at file offset 0x5
# label 'x' is in segment 'data'
# label 'x' is at offset 0x0
# label 'x' is at offset 0x5
# segment 'data' has size 0x1
#
# . prolog
@ -820,10 +820,10 @@ test-compute-offsets:
e8/call check-trace-contains/disp32
# . . discard args
81 0/subop/add 3/mod/direct 4/rm32/ESP . . . . . 8/imm32 # add to ESP
# . check-trace-contains("label 'x' is at offset 0x00000000.", msg)
# . check-trace-contains("label 'x' is at offset 0x00000005.", msg)
# . . push args
68/push "F - test-compute-offsets/5"/imm32
68/push "label 'x' is at offset 0x00000000."/imm32
68/push "label 'x' is at offset 0x00000005."/imm32
# . . call
e8/call check-trace-contains/disp32
# dump *Trace-stream {{{