[PATCH][Binutils]: Fix range check in ihex PR/24065 for 32 bit hosts.

Tamar Christina Tamar.Christina@arm.com
Tue Jan 8 10:21:00 GMT 2019


Oops, screwed up the PR in the cover letter, The original change was added by PR binutils/23699.

> -----Original Message-----
> From: binutils-owner@sourceware.org <binutils-owner@sourceware.org>
> On Behalf Of Tamar Christina
> Sent: Tuesday, January 8, 2019 10:15
> To: binutils@sourceware.org
> Cc: nd <nd@arm.com>
> Subject: [PATCH][Binutils]: Fix range check in ihex PR/24065 for 32 bit hosts.
> 
> 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.
> 
> --


More information about the Binutils mailing list