]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Most of these changes are really only cosmetic. The readelf.c patch
authorAlan Modra <amodra@gmail.com>
Wed, 26 Jan 2000 23:11:48 +0000 (23:11 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 26 Jan 2000 23:11:48 +0000 (23:11 +0000)
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.

bfd/ChangeLog
bfd/coff-i386.c
bfd/elflink.c
bfd/trad-core.c
binutils/ChangeLog
binutils/readelf.c
gprof/ChangeLog
gprof/utils.c
ld/ChangeLog
ld/ldcref.c
ld/ldmisc.c

index 97b85422e35efbeb253d923f927643a293173653..6a08870a24c013df242a5f98e3a7215652f94eb4 100644 (file)
@@ -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
index c5afe656f1ad97cb8ae22bf0747139b46853e38d..84d4d145c7b6f269acb708e40a8d95f1448b8678 100644 (file)
@@ -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.  */
index ce78b59400dccb4c3eb679dfa52ac4481c923cde..91a00e7b31e73217a2ada4ff430ae4cdcff0c3d2 100644 (file)
@@ -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);
index 2a6f69bcfd967c101d586b3b7823f009be19b673..92c5b6324eb7052889eefdd279130bbf9b465067 100644 (file)
@@ -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
index d33638b870ddbecc2900b57a928acc8099bf4957..45b7a226e0a51b6059ccd1ffb9872e1dc16b33bb 100644 (file)
@@ -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.
index aefdd22148a8520d5068dec2d49ec8306efa383e..438d5cc03f2cebf3a88e5cc35f62f04cae7960e1 100644 (file)
@@ -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))
index ae5e9f439f46e5cdd5b148ad053b8b16cea1f06c..d121301027daf365919e0e0a8f15b2ecad9c13b7 100644 (file)
@@ -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
index e1f031d5e8ddf2fb18732dac0198ae2a810d2900..c72c02e01f0d7ceed5f9ee6867f74e1a579acccd 100644 (file)
@@ -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)
index 45b8f9ff1cf9036fd61c0751ba41203852866eb6..5adfeb4f2d20f1c553f6b40ca415e15090c4b169 100644 (file)
@@ -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,
index c75b8e63fe14c912500c357d173abd5cbc9854f7..e2081066b01b4cf6c969507d3d9769afa388afee 100644 (file)
@@ -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)
     {
index 267dff14bf2d52e1e60eb76c65608a42dd3d8ade..e3439445c4b0d7fd9575a7c7debf3d2fafa14a83 100644 (file)
@@ -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':