aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-02-19 18:34:15 +1030
committerAlan Modra <amodra@gmail.com>2018-02-19 23:55:54 +1030
commit2dcf00ce6c001c42c89e6f6baace708b706994f2 (patch)
treec0500bccd3514dacca7ca0ad1e60661350ab7628 /bfd/elf32-arm.c
parentc1c8c1ef9acdeddf719f358b91590545440cea68 (diff)
downloadgdb-2dcf00ce6c001c42c89e6f6baace708b706994f2.zip
gdb-2dcf00ce6c001c42c89e6f6baace708b706994f2.tar.gz
gdb-2dcf00ce6c001c42c89e6f6baace708b706994f2.tar.bz2
%L conversions
* bfd-in.h: Include inttypes.h or if not available define PRId64, PRIu64 and PRIx64. * bfd.c (_bfd_doprnt, _bfd_doprnt_scan): Remove support for L modifier to print bfd_vma. * coff-arm.c, * coff-mcore.c, * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic80.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * dwarf2.c, * elf-m10300.c, * elf.c, * elf32-arc.c, * elf32-arm.c, * elf32-bfin.c, * elf32-cris.c, * elf32-hppa.c, * elf32-i386.c, * elf32-ip2k.c, * elf32-lm32.c, * elf32-m32r.c, * elf32-m68k.c, * elf32-metag.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-ppc.c, * elf32-rx.c, * elf32-s390.c, * elf32-score.c, * elf32-score7.c, * elf32-sh.c, * elf32-sh64.c, * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-vax.c, * elf32-xtensa.c, * elf64-alpha.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c, * elf64-s390.c, * elf64-sh64.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c, * ieee.c, * ihex.c, * mach-o.c, * merge.c, * mmo.c, * peXXigen.c, * xcofflink.c: Replace use of Lx modifier with PRIx64, and cast input to uint64_t, and similarly for Ld and Lu. * bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c91
1 files changed, 56 insertions, 35 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 6109dab..b599b1e 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -9720,8 +9720,9 @@ elf32_arm_tls_relax (struct elf32_arm_link_hash_table *globals,
| bfd_get_16 (input_bfd, contents + rel->r_offset + 2);
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): unexpected Thumb instruction '%#lx' in TLS trampoline"),
- input_bfd, input_sec, rel->r_offset, insn);
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "unexpected Thumb instruction '%#lx' in TLS trampoline"),
+ input_bfd, input_sec, (uint64_t) rel->r_offset, insn);
return bfd_reloc_notsupported;
}
break;
@@ -9760,8 +9761,9 @@ elf32_arm_tls_relax (struct elf32_arm_link_hash_table *globals,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): unexpected ARM instruction '%#lx' in TLS trampoline"),
- input_bfd, input_sec, rel->r_offset, insn);
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "unexpected ARM instruction '%#lx' in TLS trampoline"),
+ input_bfd, input_sec, (uint64_t) rel->r_offset, insn);
return bfd_reloc_notsupported;
}
break;
@@ -11531,8 +11533,11 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): unexpected Thumb instruction '%#lx' referenced by TLS_GOTDESC"),
- input_bfd, input_section, rel->r_offset, insn);
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "unexpected Thumb instruction '%#lx' "
+ "referenced by TLS_GOTDESC"),
+ input_bfd, input_section, (uint64_t) rel->r_offset,
+ insn);
return bfd_reloc_notsupported;
}
}
@@ -11554,8 +11559,11 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
default:
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): unexpected ARM instruction '%#lx' referenced by TLS_GOTDESC"),
- input_bfd, input_section, rel->r_offset, insn);
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "unexpected ARM instruction '%#lx' "
+ "referenced by TLS_GOTDESC"),
+ input_bfd, input_section, (uint64_t) rel->r_offset,
+ insn);
return bfd_reloc_notsupported;
}
}
@@ -11583,8 +11591,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): %s relocation not permitted in shared object"),
- input_bfd, input_section, rel->r_offset, howto->name);
+ (_("%pB(%pA+%#" PRIx64 "): %s relocation not permitted "
+ "in shared object"),
+ input_bfd, input_section, (uint64_t) rel->r_offset, howto->name);
return bfd_reloc_notsupported;
}
else
@@ -11796,8 +11805,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): Only ADD or SUB instructions are allowed for ALU group relocations"),
- input_bfd, input_section, rel->r_offset);
+ (_("%pB(%pA+%#" PRIx64 "): Only ADD or SUB instructions "
+ "are allowed for ALU group relocations"),
+ input_bfd, input_section, (uint64_t) rel->r_offset);
return bfd_reloc_overflow;
}
@@ -11836,9 +11846,11 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
- input_bfd, input_section, rel->r_offset,
- signed_value < 0 ? -signed_value : signed_value, howto->name);
+ (_("%pB(%pA+%#" PRIx64 "): Overflow whilst "
+ "splitting %#" PRIx64 " for group relocation %s"),
+ input_bfd, input_section, (uint64_t) rel->r_offset,
+ (uint64_t) (signed_value < 0 ? -signed_value : signed_value),
+ howto->name);
return bfd_reloc_overflow;
}
@@ -11926,9 +11938,11 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
- input_bfd, input_section, rel->r_offset,
- signed_value < 0 ? -signed_value : signed_value, howto->name);
+ (_("%pB(%pA+%#" PRIx64 "): Overflow whilst "
+ "splitting %#" PRIx64 " for group relocation %s"),
+ input_bfd, input_section, (uint64_t) rel->r_offset,
+ (uint64_t) (signed_value < 0 ? -signed_value : signed_value),
+ howto->name);
return bfd_reloc_overflow;
}
@@ -12012,9 +12026,11 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
- input_bfd, input_section, rel->r_offset,
- signed_value < 0 ? -signed_value : signed_value, howto->name);
+ (_("%pB(%pA+%#" PRIx64 "): Overflow whilst "
+ "splitting %#" PRIx64 " for group relocation %s"),
+ input_bfd, input_section, (uint64_t) rel->r_offset,
+ (uint64_t) (signed_value < 0 ? -signed_value : signed_value),
+ howto->name);
return bfd_reloc_overflow;
}
@@ -12100,9 +12116,11 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): Overflow whilst splitting %#Lx for group relocation %s"),
- input_bfd, input_section, rel->r_offset,
- signed_value < 0 ? -signed_value : signed_value, howto->name);
+ (_("%pB(%pA+%#" PRIx64 "): Overflow whilst "
+ "splitting %#" PRIx64 " for group relocation %s"),
+ input_bfd, input_section, (uint64_t) rel->r_offset,
+ (uint64_t) (signed_value < 0 ? -signed_value : signed_value),
+ howto->name);
return bfd_reloc_overflow;
}
@@ -12366,9 +12384,10 @@ elf32_arm_relocate_section (bfd * output_bfd,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): %s relocation against SEC_MERGE section"),
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "%s relocation against SEC_MERGE section"),
input_bfd, input_section,
- rel->r_offset, howto->name);
+ (uint64_t) rel->r_offset, howto->name);
return FALSE;
}
@@ -12478,12 +12497,12 @@ elf32_arm_relocate_section (bfd * output_bfd,
_bfd_error_handler
((sym_type == STT_TLS
/* xgettext:c-format */
- ? _("%pB(%pA+%#Lx): %s used with TLS symbol %s")
+ ? _("%pB(%pA+%#" PRIx64 "): %s used with TLS symbol %s")
/* xgettext:c-format */
- : _("%pB(%pA+%#Lx): %s used with non-TLS symbol %s")),
+ : _("%pB(%pA+%#" PRIx64 "): %s used with non-TLS symbol %s")),
input_bfd,
input_section,
- rel->r_offset,
+ (uint64_t) rel->r_offset,
howto->name,
name);
}
@@ -12533,10 +12552,11 @@ elf32_arm_relocate_section (bfd * output_bfd,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): unresolvable %s relocation against symbol `%s'"),
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "unresolvable %s relocation against symbol `%s'"),
input_bfd,
input_section,
- rel->r_offset,
+ (uint64_t) rel->r_offset,
howto->name,
h->root.root.string);
return FALSE;
@@ -18418,12 +18438,13 @@ elf32_arm_write_section (bfd *output_bfd,
branch_to_veneer - (1 << 24) : 0;
_bfd_error_handler
- (_("%pB(%#Lx): error: Cannot create STM32L4XX veneer. "
- "Jump out of range by %Ld bytes. "
+ (_("%pB(%#" PRIx64 "): error: "
+ "Cannot create STM32L4XX veneer. "
+ "Jump out of range by %" PRId64 " bytes. "
"Cannot encode branch instruction. "),
output_bfd,
- stm32l4xx_errnode->vma - 4,
- out_of_range);
+ (uint64_t) (stm32l4xx_errnode->vma - 4),
+ (int64_t) out_of_range);
continue;
}