]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ldlang.c (record_bfd_errors): Remove.
authorAlan Modra <amodra@gmail.com>
Fri, 8 Jun 2001 02:01:12 +0000 (02:01 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 8 Jun 2001 02:01:12 +0000 (02:01 +0000)
Merge from mainline.
2001-05-31  H.J. Lu  <hjl@gnu.org>
* ldlang.c (open_input_bfds): Don't change the bfd error
handler whilst loading symbols.

2001-05-02  Nick Clifton  <nickc@redhat.com>
* emultempl/aix.em: Replace buystring with xstrdup.
* emultempl/beos.em: Replace buystring with xstrdup.

ld/ChangeLog
ld/emultempl/aix.em
ld/emultempl/beos.em
ld/ldlang.c

index 336aeeb693a99e80f09261abc5bafa39ab062b0a..8ae4eb7400408a4397ee5e0b7f3c6dd7b69216c8 100644 (file)
@@ -1,3 +1,16 @@
+2001-06-08  Alan Modra  <amodra@bigpond.net.au>
+
+       * ldlang.c (record_bfd_errors): Remove.
+
+       Merge from mainline.
+       2001-05-31  H.J. Lu  <hjl@gnu.org>
+       * ldlang.c (open_input_bfds): Don't change the bfd error
+       handler whilst loading symbols.
+
+       2001-05-02  Nick Clifton  <nickc@redhat.com>
+       * emultempl/aix.em: Replace buystring with xstrdup.
+       * emultempl/beos.em: Replace buystring with xstrdup.
+
 2001-06-07  Alan Modra  <amodra@bigpond.net.au>
 
        * Many files: Update copyright notices.
index f5f1c662727a7774ceeb856164e4f65aac8f7449..de07f297f4760eaafb4c9d34c24cae18dbf9c597 100644 (file)
@@ -857,7 +857,7 @@ gld${EMULATION_NAME}_read_file (filename, import)
          n = ((struct export_symbol_list *)
               xmalloc (sizeof (struct export_symbol_list)));
          n->next = export_symbols;
-         n->name = buystring (symname);
+         n->name = xstrdup (symname);
          n->syscall = syscall;
          export_symbols = n;
        }
index f3e73a51e40b47df07bef691db02b277b0b97a05..3c9e3edc9b2ae6785b4d7a5e8eb06291fe03266e 100644 (file)
@@ -739,7 +739,7 @@ gld${EMULATION_NAME}_place_orphan (file, s)
   /* Look up the output section.  The Microsoft specs say sections names in
      image files never contain a '\$'.  Fortunately, lang_..._lookup creates
      the section if it doesn't exist.  */
-  output_secname = buystring (secname);
+  output_secname = xstrdup (secname);
   ps = strchr (output_secname + 1, '\$');
   *ps = 0;
   os = lang_output_section_statement_lookup (output_secname);
index 4fe0ee934ec0babc96b36910586436324849f828..f683abb1405227e52b08c109d330c754fff65192 100644 (file)
@@ -127,7 +127,6 @@ static bfd_vma size_input_section
           fill_type, bfd_vma, boolean));
 static void lang_finish PARAMS ((void));
 static void ignore_bfd_errors PARAMS ((const char *, ...));
-static void record_bfd_errors PARAMS ((const char *, ...));
 static void lang_check PARAMS ((void));
 static void lang_common PARAMS ((void));
 static boolean lang_one_common PARAMS ((struct bfd_link_hash_entry *, PTR));
@@ -1900,7 +1899,6 @@ open_input_bfds (s, force)
          if (s->input_statement.real)
            {
              lang_statement_list_type add;
-             bfd_error_handler_type pfn;
 
              s->input_statement.target = current_target;
 
@@ -1917,15 +1915,8 @@ open_input_bfds (s, force)
 
              lang_list_init (&add);
 
-             /* We need to know if an error occurs whilst loading the
-                symbols, since this means that a valid executable can
-                not be produced.  */
-             pfn = bfd_set_error_handler (record_bfd_errors);
-
              load_symbols (&s->input_statement, &add);
 
-             bfd_set_error_handler (pfn);
-
              if (add.head != NULL)
                {
                  *add.tail = s->next;
@@ -3456,53 +3447,6 @@ lang_finish ()
     }
 }
 
-/* This is the routine to handle BFD error messages.  */
-
-#ifdef ANSI_PROTOTYPES
-
-static void
-record_bfd_errors (const char *s, ...)
-{
-  va_list p;
-
-  einfo ("%P: ");
-
-  va_start (p, s);
-
-  vfprintf (stderr, s, p);
-
-  va_end (p);
-
-  fprintf (stderr, "\n");
-
-  einfo ("%X");
-}
-
-#else /* ! defined (ANSI_PROTOTYPES) */
-
-static void
-record_bfd_errors (va_alist)
-     va_dcl
-{
-  va_list p;
-  const char *s;
-
-  einfo ("%P: ");
-
-  va_start (p);
-
-  s = va_arg (p, const char *);
-  vfprintf (stderr, s, p);
-
-  va_end (p);
-
-  fprintf (stderr, "\n");
-
-  einfo ("%X");
-}
-
-#endif /* ! defined (ANSI_PROTOTYPES) */
-
 /* This is a small function used when we want to ignore errors from
    BFD.  */