[PATCH][Binutils]: Fix range check in ihex PR/24065 for 32 bit hosts.
Tamar Christina
Tamar.Christina@arm.com
Tue Jan 8 10:16:00 GMT 2019
Hi All,
The change in PR binutils/24065 added a check to see if the value is in a 32-bit range.
It does this using two 64-bit masks that are stored inside a bfd_vma.
This now rejects all values on a 32-bit host as bfd_vma seems host dependent. This
patch changes the type for the masks from bfd_vma to uint64_t.
build on native hardware and regtested on
aarch64-none-elf, aarch64-none-elf (32 bit host),
aarch64-none-linux-gnu, aarch64-none-linux-gnu (32 bit host)
arm-none-eabi, arm-none-eabi (32 bit host),
arm-none-linux-gnueabihf, arm-none-linux-gnueabihf (32 bit host)
Cross-compiled and regtested on
aarch64-none-linux-gnu, aarch64_be-none-linux-gnu
arm-none-eabi, armeb-none-eabi
and no issues.
Ok for master?
Thanks,
Tamar
bfd/ChangeLog:
2019-01-08 Tamar Christina <tamar.christina@arm.com>
PR binutils/24065
* ihex.c (ihex_write_object_contents): Change bfd_vma to uint64_t.
binutils/ChangeLog:
2019-01-08 Tamar Christina <tamar.christina@arm.com>
PR binutils/24065
* testsuite/binutils-all/copy-6.d: New test.
* testsuite/binutils-all/objcopy.exp: Use it.
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb10555.patch
Type: text/x-diff
Size: 1649 bytes
Desc: rb10555.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20190108/ed2b4dc0/attachment.bin>
More information about the Binutils
mailing list