diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2012-06-25 04:55:55 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2012-07-14 10:32:34 +0000 |
commit | 636bd289398d203b2be5542279d24459767d6d4c (patch) | |
tree | 7759b88da712b6f38fad80954478cacea0967316 /ppc.ld | |
parent | fabaaf1d1f3f793999257cb16b509e32dfc1de71 (diff) |
disas: Fix printing of addresses in disassembly
In our disassembly code, the bfd_vma type is always 64 bits,
even if the target's virtual address width is only 32 bits. This
means that when we print out addresses we need to truncate them
to 32 bits, to avoid odd output which has incorrectly sign-extended
a value to 64 bits, for instance this ARM example:
0x80479a60: e59f4088 ldr r4, [pc, #136] ; 0xffffffff80479a4f
(It would also be possible to truncate before passing the address
to info->print_address_func(), but truncating in the final print
function is the same approach that binutils takes to this problem.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'ppc.ld')
0 files changed, 0 insertions, 0 deletions