aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-11-28 14:29:23 +1030
committerAlan Modra <amodra@gmail.com>2014-11-28 14:34:10 +1030
commit8066deb11b8e23de5c75e3e2526524bdef0f5a41 (patch)
tree91c5eba71081ce67bad3bf4e7290b21665f84105 /binutils
parent10e79639cc08c050b8fa97c0a5af102683a11e3c (diff)
downloadgdb-8066deb11b8e23de5c75e3e2526524bdef0f5a41.zip
gdb-8066deb11b8e23de5c75e3e2526524bdef0f5a41.tar.gz
gdb-8066deb11b8e23de5c75e3e2526524bdef0f5a41.tar.bz2
Fix build breakage on 32-bit targets with 64-bit bfd
* readelf.c (get_32bit_elf_symbols): Cast bfd_size_type values to unsigned long for %lx. (get_64bit_elf_symbols, process_section_groups): Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/readelf.c17
2 files changed, 18 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 709c1cc..a0f6889 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-28 Alan Modra <amodra@gmail.com>
+
+ * readelf.c (get_32bit_elf_symbols): Cast bfd_size_type values to
+ unsigned long for %lx.
+ (get_64bit_elf_symbols, process_section_groups): Likewise.
+
2014-11-27 Espen Grindhaug <espen@grindhaug.org>
Nick Clifton <nickc@redhat.com>
diff --git a/binutils/readelf.c b/binutils/readelf.c
index c00b62b..a6d563f 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -4787,7 +4787,9 @@ get_32bit_elf_symbols (FILE * file,
if (number * sizeof (Elf32_External_Sym) > section->sh_size + 1)
{
error (_("Size (0x%lx) of section %s is not a multiple of its sh_entsize (0x%lx)\n"),
- section->sh_size, printable_section_name (section), section->sh_entsize);
+ (unsigned long) section->sh_size,
+ printable_section_name (section),
+ (unsigned long) section->sh_entsize);
goto exit_point;
}
@@ -4877,14 +4879,16 @@ get_64bit_elf_symbols (FILE * file,
if (section->sh_entsize == 0 || section->sh_entsize > section->sh_size)
{
error (_("Section %s has an invalid sh_entsize of 0x%lx\n"),
- printable_section_name (section), (unsigned long) section->sh_entsize);
+ printable_section_name (section),
+ (unsigned long) section->sh_entsize);
goto exit_point;
}
if (section->sh_size > current_file_size)
{
error (_("Section %s has an invalid sh_size of 0x%lx\n"),
- printable_section_name (section), (unsigned long) section->sh_size);
+ printable_section_name (section),
+ (unsigned long) section->sh_size);
goto exit_point;
}
@@ -4893,7 +4897,9 @@ get_64bit_elf_symbols (FILE * file,
if (number * sizeof (Elf64_External_Sym) > section->sh_size + 1)
{
error (_("Size (0x%lx) of section %s is not a multiple of its sh_entsize (0x%lx)\n"),
- section->sh_size, printable_section_name (section), section->sh_entsize);
+ (unsigned long) section->sh_size,
+ printable_section_name (section),
+ (unsigned long) section->sh_entsize);
goto exit_point;
}
@@ -5840,7 +5846,8 @@ process_section_groups (FILE * file)
{
error (_("Section %s has sh_entsize (0x%lx) which is larger than its size (0x%lx)\n"),
printable_section_name (section),
- section->sh_entsize, section->sh_size);
+ (unsigned long) section->sh_entsize,
+ (unsigned long) section->sh_size);
break;
}