[AArch64] Fix -Werror on build on cross build

Message ID 20190521161751.GA26642@arm.com
State New
Headers show
Series
  • [AArch64] Fix -Werror on build on cross build
Related show

Commit Message

Tamar Christina May 21, 2019, 4:17 p.m.
Hi All,

This patch fixes a hardcoded `l` specifier on a `bfd_signed_vma`.
Instead this now uses BFD_VMA_FMT which fixes the build on 32 bit
hosts.

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)

Cross-compiled and regtested on
  aarch64-none-linux-gnu, aarch64_be-none-linux-gnu

and no issues.

Committed under the obvious rule.

Thanks,
Tamar

bfd/ChangeLog:

2019-05-21  Tamar Christina  <tamar.christina@arm.com>

	PR ld/24373
	* elfnn-aarch64.c (_bfd_aarch64_erratum_843419_branch_to_stub):
	Fix print formatter.

--

Patch

diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 29310184d2a3afd6af4c4c41eb4ddc78aaae0854..9e28544e4bd4d84cb85a156991a399656d13b10a 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -5309,7 +5309,7 @@  _bfd_aarch64_erratum_843419_branch_to_stub (struct bfd_hash_entry *gen_entry,
     {
       abfd = stub_entry->target_section->owner;
       _bfd_error_handler
-	(_("%pB: error: erratum 843419 immediate 0x%lx "
+	(_("%pB: error: erratum 843419 immediate 0x%" BFD_VMA_FMT "x "
 	   "out of range for ADR (input file too large) and "
 	   "--fix-cortex-a53-843419=adr used.  Run the linker with "
 	   "--fix-cortex-a53-843419=full instead"), abfd, imm);