aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2000-02-22 07:18:10 +0000
committerIan Lance Taylor <ian@airs.com>2000-02-22 07:18:10 +0000
commit160622076929d2cac8d47306b07d21823b9f6684 (patch)
treeb1645218a148a9dba26fed4e4fa87fc307108714 /binutils
parenta432cc3d1ca43fdeeb1f0bf160b3531533629132 (diff)
downloadgdb-160622076929d2cac8d47306b07d21823b9f6684.zip
gdb-160622076929d2cac8d47306b07d21823b9f6684.tar.gz
gdb-160622076929d2cac8d47306b07d21823b9f6684.tar.bz2
From Brad Lucier <lucier@math.purdue.edu>:
* readelf.c (process_version_sections): Add casts to make sure argument to %* is an int. (process_mips_specific): Add casts to make printf arguments match format.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog8
-rw-r--r--binutils/readelf.c33
2 files changed, 25 insertions, 16 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 89376b9..ac00cfc 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,11 @@
+2000-02-22 Ian Lance Taylor <ian@zembu.com>
+
+ From Brad Lucier <lucier@math.purdue.edu>:
+ * readelf.c (process_version_sections): Add casts to make sure
+ argument to %* is an int.
+ (process_mips_specific): Add casts to make printf arguments match
+ format.
+
2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
* objdump.c (dump_section_header): Change `opb' to unsigned.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 438d5cc..f766976 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3739,6 +3739,7 @@ process_version_sections (file)
for (cnt = 0; cnt < total; cnt += 4)
{
int j, nn;
+ char *name;
printf (" %03x:", cnt);
@@ -3799,10 +3800,10 @@ process_version_sections (file)
{
ivna.vna_name = BYTE_GET (evna.vna_name);
+ name = strtab + ivna.vna_name;
nn += printf ("(%s%-*s",
- strtab + ivna.vna_name,
- 12 - strlen (strtab
- + ivna.vna_name),
+ name,
+ 12 - (int) strlen (name),
")");
break;
}
@@ -3845,12 +3846,11 @@ process_version_sections (file)
ivda.vda_name =
BYTE_GET (evda.vda_name);
+ name = strtab + ivda.vda_name;
nn +=
printf ("(%s%-*s",
- strtab + ivda.vda_name,
- 12
- - strlen (strtab
- + ivda.vda_name),
+ name,
+ 12 - (int) strlen (name),
")");
}
}
@@ -3901,10 +3901,10 @@ process_version_sections (file)
{
ivna.vna_name = BYTE_GET (evna.vna_name);
+ name = strtab + ivna.vna_name;
nn += printf ("(%s%-*s",
- strtab + ivna.vna_name,
- 12 - strlen (strtab
- + ivna.vna_name),
+ name,
+ 12 - (int) strlen (name),
")");
break;
}
@@ -3946,10 +3946,10 @@ process_version_sections (file)
ivda.vda_name = BYTE_GET (evda.vda_name);
+ name = strtab + ivda.vda_name;
nn += printf ("(%s%-*s",
- strtab + ivda.vda_name,
- 12 - strlen (strtab
- + ivda.vda_name),
+ name,
+ 12 - (int) strlen (name),
")");
}
}
@@ -6611,7 +6611,8 @@ process_mips_specific (file)
GET_DATA_ALLOC (liblist_offset, liblistno * sizeof (Elf32_External_Lib),
elib, Elf32_External_Lib *, "liblist");
- printf ("\nSection '.liblist' contains %d entries:\n", liblistno);
+ printf ("\nSection '.liblist' contains %lu entries:\n",
+ (unsigned long) liblistno);
fputs (" Library Time Stamp Checksum Version Flags\n",
stdout);
@@ -6629,7 +6630,7 @@ process_mips_specific (file)
strftime (timebuf, 20, "%Y-%m-%dT%H:%M:%S", gmtime (&time));
- printf ("%3d: %-20s %s %#10lx %-7ld", cnt,
+ printf ("%3lu: %-20s %s %#10lx %-7ld", (unsigned long) cnt,
dynamic_strings + liblist.l_name, timebuf,
liblist.l_checksum, liblist.l_version);
@@ -6913,7 +6914,7 @@ process_mips_specific (file)
{
Elf_Internal_Sym * psym = &dynamic_symbols[iconf[cnt]];
- printf ("%5u: %8lu ", cnt, iconf[cnt]);
+ printf ("%5lu: %8lu ", (unsigned long) cnt, iconf[cnt]);
print_vma (psym->st_value, FULL_HEX);
printf (" %s\n", dynamic_strings + psym->st_name);
}