Sign-extend start and stop address inputs to objdump
authorFaraz Shahbazker <fshahbazker@wavecomp.com>
Sat, 4 May 2019 01:21:49 +0000 (18:21 -0700)
committerFaraz Shahbazker <fshahbazker@wavecomp.com>
Wed, 8 May 2019 16:07:35 +0000 (09:07 -0700)
commit2379f9c475505ecedc97607b39af7184bd67aa88
tree1640b839f8c2c2ceedb7d53225b8b6e30c16e2ce
parent46752c37b06c83a8cbf6be887beac4092d5e3505
Sign-extend start and stop address inputs to objdump

For targets that treat addresses as signed (MIPS/SH64), user-specified
start/stop address limits cannot be compared directly to section VMAs.
We must sign-extend user-specified 32-bit address limits which have
bit 31 set for such targets.

binutils/
* objdump.c (sign_extend_address): New function.
(dump_bfd): Sign-extend user-specified start/stop addresses
for targets that need it.
* testsuite/binutils-all/objdump.exp: Add tests for objdump
with start and stop addresses in higher address ranges.
binutils/ChangeLog
binutils/objdump.c
binutils/testsuite/binutils-all/objdump.exp