diff options
author | Alan Modra <amodra@gmail.com> | 2000-01-26 23:11:48 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-01-26 23:11:48 +0000 |
commit | 305c72062b487da283913b9f4b3016b0546c64a3 (patch) | |
tree | a298d4281e21b134459e5f9d5ce964bb95469bc7 | |
parent | 4c63da97a708e211a7141e29082ab589cbdbcb12 (diff) | |
download | gdb-305c72062b487da283913b9f4b3016b0546c64a3.zip gdb-305c72062b487da283913b9f4b3016b0546c64a3.tar.gz gdb-305c72062b487da283913b9f4b3016b0546c64a3.tar.bz2 |
Most of these changes are really only cosmetic. The readelf.c patch
fixes a thinko in get_dynamic_flags. I found at least one message
string that included a `%' being passed to printf in the format
argument.
-rw-r--r-- | bfd/ChangeLog | 11 | ||||
-rw-r--r-- | bfd/coff-i386.c | 3 | ||||
-rw-r--r-- | bfd/elflink.c | 4 | ||||
-rw-r--r-- | bfd/trad-core.c | 4 | ||||
-rw-r--r-- | binutils/ChangeLog | 10 | ||||
-rw-r--r-- | binutils/readelf.c | 19 | ||||
-rw-r--r-- | gprof/ChangeLog | 5 | ||||
-rw-r--r-- | gprof/utils.c | 2 | ||||
-rw-r--r-- | ld/ChangeLog | 9 | ||||
-rw-r--r-- | ld/ldcref.c | 4 | ||||
-rw-r--r-- | ld/ldmisc.c | 4 |
11 files changed, 56 insertions, 19 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 97b8542..6a08870 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,14 @@ +2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au> + + * coff-i386.c (i3coff_object_p): Remove prototype. + Update copyright. + + * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const + to name. Update copyright. + + * trad-core.c (trad_unix_core_file_p): Cast core_regsec + assignment to avoid warning. Update copyright. + 2000-01-24 Robert Lipe (robertl@sco.com) * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c index c5afe65..84d4d14 100644 --- a/bfd/coff-i386.c +++ b/bfd/coff-i386.c @@ -1,5 +1,5 @@ /* BFD back-end for Intel 386 COFF files. - Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Cygnus Support. @@ -45,7 +45,6 @@ static reloc_howto_type *coff_i386_rtype_to_howto bfd_vma *)); static reloc_howto_type *coff_i386_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type)); -static const bfd_target *i3coff_object_p PARAMS ((bfd *)); #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2) /* The page size is a guess based on ELF. */ diff --git a/bfd/elflink.c b/bfd/elflink.c index ce78b59..91a00e7 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -1,5 +1,5 @@ /* ELF linking support for BFD. - Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. This file is part of BFD, the Binary File Descriptor library. @@ -231,7 +231,7 @@ _bfd_elf_link_record_dynamic_symbol (info, h) if (h->root.type == bfd_link_hash_undefined) { bfd * abfd = h->root.u.undef.abfd; - char * name = h->root.root.string; + const char * name = h->root.root.string; (*info->callbacks->undefined_symbol) (info, name, abfd, bfd_und_section_ptr, 0); diff --git a/bfd/trad-core.c b/bfd/trad-core.c index 2a6f69b..92c5b63 100644 --- a/bfd/trad-core.c +++ b/bfd/trad-core.c @@ -1,5 +1,5 @@ /* BFD back end for traditional Unix core files (U-area and raw sections) - Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 1999 + Copyright 1988, 89, 91, 92, 93, 94, 95, 96, 98, 99, 2000 Free Software Foundation, Inc. Written by John Gilmore of Cygnus Support. @@ -202,7 +202,7 @@ trad_unix_core_file_p (abfd) 0 is at the place pointed to by u_ar0 (by setting the vma of the start of the section to -u_ar0). GDB uses this info to locate the regs, using minor trickery to get around the offset-or-absolute-addr problem. */ - core_regsec (abfd)->vma = 0 - (bfd_vma) u.u_ar0; + core_regsec (abfd)->vma = (asection *) (0 - (bfd_vma) u.u_ar0); core_datasec (abfd)->filepos = NBPG * UPAGES; core_stacksec (abfd)->filepos = (NBPG * UPAGES) + NBPG * u.u_dsize diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d33638b..45b7a22 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,13 @@ +2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au> + + * readelf.c (get_dynamic_flags): Return buff. + (process_dynamic_segment): Don't pass error strings to printf + as format arg. + (read_and_display_attr): Use lx and ld to print longs. + (process_corefile_note_segment): Cast bfd_vma to unsigned long + before printing. + Update copyright. + 2000-01-17 Nick Clifton <nickc@cygnus.com> * readelf.c (get_osabi_name): Recognise ELFOSABI_ARM. diff --git a/binutils/readelf.c b/binutils/readelf.c index aefdd22..438d5cc 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -1,5 +1,5 @@ /* readelf.c -- display contents of an ELF format file - Copyright (C) 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1998, 99, 2000 Free Software Foundation, Inc. Originally developed by Eric Youngdale <eric@andante.jic.com> Modifications by Nick Clifton <nickc@cygnus.com> @@ -2999,9 +2999,10 @@ get_dynamic_flags (flags) case DF_SYMBOLIC: strcat (buff, "SYMBOLIC "); break; case DF_TEXTREL: strcat (buff, "TEXTREL "); break; case DF_BIND_NOW: strcat (buff, "BIND_NOW "); break; - default: strcat (buff, "unknown "); return; + default: strcat (buff, "unknown "); break; } } + return buff; } /* Parse and display the contents of the dynamic segment. */ @@ -3178,7 +3179,7 @@ process_dynamic_segment (file) { case DT_FLAGS: if (do_dynamic) - printf (get_dynamic_flags (entry->d_un.d_val)); + printf ("%s", get_dynamic_flags (entry->d_un.d_val)); break; case DT_AUXILIARY: @@ -5965,7 +5966,7 @@ read_and_display_attr (attribute, form, data, pointer_size) case DW_FORM_ref_addr: case DW_FORM_addr: uvalue = byte_get (data, pointer_size); - printf (is_ref ? " <%x>" : " %#x", uvalue); + printf (is_ref ? " <%lx>" : " %#lx", uvalue); data += pointer_size; break; @@ -5973,21 +5974,21 @@ read_and_display_attr (attribute, form, data, pointer_size) case DW_FORM_flag: case DW_FORM_data1: uvalue = byte_get (data ++, 1); - printf (is_ref ? " <%x>" : " %d", uvalue); + printf (is_ref ? " <%lx>" : " %ld", uvalue); break; case DW_FORM_ref2: case DW_FORM_data2: uvalue = byte_get (data, 2); data += 2; - printf (is_ref ? " <%x>" : " %d", uvalue); + printf (is_ref ? " <%lx>" : " %ld", uvalue); break; case DW_FORM_ref4: case DW_FORM_data4: uvalue = byte_get (data, 4); data += 4; - printf (is_ref ? " <%x>" : " %d", uvalue); + printf (is_ref ? " <%lx>" : " %ld", uvalue); break; case DW_FORM_ref8: @@ -6981,7 +6982,9 @@ process_corefile_note_segment (file, offset, length) external = pnotes; - printf (_("\nNotes at offset 0x%08lx with length 0x%08lx:\n"), offset, length); + printf (_("\nNotes at offset 0x%08lx with length 0x%08lx:\n"), + (unsigned long) offset, + (unsigned long) length); printf (_(" Owner\t\tData size\tDescription\n")); while (external < (Elf_External_Note *)((char *) pnotes + length)) diff --git a/gprof/ChangeLog b/gprof/ChangeLog index ae5e9f4..d121301 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,8 @@ +2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au> + + * utils.c (print_name_only): Don't pass error strings to + printf as format arg. + 1999-09-24 Nick Clifton <nickc@cygnus.com> * gmon_io.c (gmon_out_read): Make sure that sensible values diff --git a/gprof/utils.c b/gprof/utils.c index e1f031d..c72c02e 100644 --- a/gprof/utils.c +++ b/gprof/utils.c @@ -69,7 +69,7 @@ DEFUN (print_name_only, (self), Sym * self) } } sprintf (buf, " (%s:%d)", filename, self->line_num); - printf (buf); + printf ("%s", buf); size += strlen (buf); } if (demangled) diff --git a/ld/ChangeLog b/ld/ChangeLog index 45b8f9f..5adfeb4 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au> + + * ldcref.c (output_cref): Don't pass message strings to printf + as format arg. + Update copyright. + + * ldmisc.c (vfinfo): Same here. + Update copyright. + 2000-01-23 Alan Modra <alan@spri.levels.unisa.edu.au> * emultempl/{armcoff.em,armelf.em,armelf_oabi.em,beos.em, diff --git a/ld/ldcref.c b/ld/ldcref.c index c75b8e6..e208106 100644 --- a/ld/ldcref.c +++ b/ld/ldcref.c @@ -1,5 +1,5 @@ /* ldcref.c -- output a cross reference table - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Ian Lance Taylor <ian@cygnus.com> This file is part of GLD, the Gnu Linker. @@ -238,7 +238,7 @@ output_cref (fp) fprintf (fp, _("\nCross Reference Table\n\n")); msg = _("Symbol"); - fprintf (fp, msg); + fprintf (fp, "%s", msg); len = strlen (msg); while (len < FILECOL) { diff --git a/ld/ldmisc.c b/ld/ldmisc.c index 267dff1..e343944 100644 --- a/ld/ldmisc.c +++ b/ld/ldmisc.c @@ -1,5 +1,5 @@ /* ldmisc.c - Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 1999 + Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. Written by Steve Chamberlain of Cygnus Support. @@ -213,7 +213,7 @@ vfinfo (fp, fmt, arg) case 'E': /* current bfd error or errno */ - fprintf (fp, bfd_errmsg (bfd_get_error ())); + fprintf (fp, "%s", bfd_errmsg (bfd_get_error ())); break; case 'I': |