aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-sh.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-sh.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-sh.c')
-rw-r--r--bfd/elf32-sh.c100
1 files changed, 56 insertions, 44 deletions
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 7c8ec6c..5cb4acc 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -577,8 +577,9 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
if (laddr >= sec->size)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: %#Lx: warning: bad R_SH_USES offset"),
- abfd, irel->r_offset);
+ _bfd_error_handler
+ (_("%pB: %#" PRIx64 ": warning: bad R_SH_USES offset"),
+ abfd, (uint64_t) irel->r_offset);
continue;
}
insn = bfd_get_16 (abfd, contents + laddr);
@@ -589,8 +590,9 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: warning: R_SH_USES points to unrecognized insn 0x%x"),
- abfd, irel->r_offset, insn);
+ (_("%pB: %#" PRIx64 ": warning: "
+ "R_SH_USES points to unrecognized insn 0x%x"),
+ abfd, (uint64_t) irel->r_offset, insn);
continue;
}
@@ -607,8 +609,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: warning: bad R_SH_USES load offset"),
- abfd, irel->r_offset);
+ (_("%pB: %#" PRIx64 ": warning: bad R_SH_USES load offset"),
+ abfd, (uint64_t) irel->r_offset);
continue;
}
@@ -623,8 +625,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: warning: could not find expected reloc"),
- abfd, paddr);
+ (_("%pB: %#" PRIx64 ": warning: could not find expected reloc"),
+ abfd, (uint64_t) paddr);
continue;
}
@@ -652,8 +654,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: warning: symbol in unexpected section"),
- abfd, paddr);
+ (_("%pB: %#" PRIx64 ": warning: symbol in unexpected section"),
+ abfd, (uint64_t) paddr);
continue;
}
@@ -782,8 +784,9 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: warning: could not find expected COUNT reloc"),
- abfd, paddr);
+ (_("%pB: %#" PRIx64 ": warning: "
+ "could not find expected COUNT reloc"),
+ abfd, (uint64_t) paddr);
continue;
}
@@ -792,8 +795,8 @@ sh_elf_relax_section (bfd *abfd, asection *sec,
if (irelcount->r_addend == 0)
{
/* xgettext:c-format */
- _bfd_error_handler (_("%pB: %#Lx: warning: bad count"),
- abfd, paddr);
+ _bfd_error_handler (_("%pB: %#" PRIx64 ": warning: bad count"),
+ abfd, (uint64_t) paddr);
continue;
}
@@ -1196,8 +1199,8 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: fatal: reloc overflow while relaxing"),
- abfd, irel->r_offset);
+ (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"),
+ abfd, (uint64_t) irel->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -1567,8 +1570,8 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: fatal: reloc overflow while relaxing"),
- abfd, irel->r_offset);
+ (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"),
+ abfd, (uint64_t) irel->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -4000,9 +4003,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
_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;
}
@@ -4118,10 +4122,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
_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;
@@ -4197,9 +4202,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: fatal: unaligned branch target for relax-support relocation"),
+ (_("%pB: %#" PRIx64 ": fatal: "
+ "unaligned branch target for relax-support relocation"),
input_section->owner,
- rel->r_offset);
+ (uint64_t) rel->r_offset);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -4231,10 +4237,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: fatal: unaligned %s relocation %#Lx"),
- input_section->owner,
- rel->r_offset, howto->name,
- relocation);
+ (_("%pB: %#" PRIx64 ": fatal: "
+ "unaligned %s relocation %#" PRIx64),
+ input_section->owner, (uint64_t) rel->r_offset,
+ howto->name, (uint64_t) relocation);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -4247,10 +4253,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: fatal: unaligned %s relocation %#Lx"),
+ (_("%pB: %#" PRIx64 ": fatal: "
+ "unaligned %s relocation %#" PRIx64 ""),
input_section->owner,
- rel->r_offset, howto->name,
- relocation);
+ (uint64_t) rel->r_offset, howto->name,
+ (uint64_t) relocation);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -4262,10 +4269,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: fatal: R_SH_PSHA relocation %Ld not in range -32..32"),
+ (_("%pB: %#" PRIx64 ": fatal: R_SH_PSHA relocation %" PRId64
+ " not in range -32..32"),
input_section->owner,
- rel->r_offset,
- relocation);
+ (uint64_t) rel->r_offset,
+ (int64_t) relocation);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -4277,10 +4285,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: %#Lx: fatal: R_SH_PSHL relocation %Ld not in range -32..32"),
+ (_("%pB: %#" PRIx64 ": fatal: R_SH_PSHL relocation %" PRId64
+ " not in range -32..32"),
input_section->owner,
- rel->r_offset,
- relocation);
+ (uint64_t) rel->r_offset,
+ (int64_t) relocation);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
@@ -4423,10 +4432,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): cannot emit fixup to `%s' in read-only section"),
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "cannot emit fixup to `%s' in read-only section"),
input_bfd,
input_section,
- rel->r_offset,
+ (uint64_t) rel->r_offset,
symname);
return FALSE;
}
@@ -4896,10 +4906,11 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): cannot emit fixup to `%s' in read-only section"),
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "cannot emit fixup to `%s' in read-only section"),
input_bfd,
input_section,
- rel->r_offset,
+ (uint64_t) rel->r_offset,
symname);
return FALSE;
}
@@ -4998,9 +5009,10 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB(%pA+%#Lx): %s relocation against external symbol \"%s\""),
- input_bfd, input_section, rel->r_offset, howto->name,
- h->root.root.string);
+ (_("%pB(%pA+%#" PRIx64 "): "
+ "%s relocation against external symbol \"%s\""),
+ input_bfd, input_section, (uint64_t) rel->r_offset,
+ howto->name, h->root.root.string);
return FALSE;
}
else