From: Alan Modra Date: Fri, 8 Jun 2001 02:01:12 +0000 (+0000) Subject: * ldlang.c (record_bfd_errors): Remove. X-Git-Tag: binutils-2_11_1~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c00a5ef04b36062b05e5b1f4a6b678940f21aea8;p=thirdparty%2Fbinutils-gdb.git * ldlang.c (record_bfd_errors): Remove. Merge from mainline. 2001-05-31 H.J. Lu * ldlang.c (open_input_bfds): Don't change the bfd error handler whilst loading symbols. 2001-05-02 Nick Clifton * emultempl/aix.em: Replace buystring with xstrdup. * emultempl/beos.em: Replace buystring with xstrdup. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 336aeeb693a..8ae4eb74004 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,16 @@ +2001-06-08 Alan Modra + + * ldlang.c (record_bfd_errors): Remove. + + Merge from mainline. + 2001-05-31 H.J. Lu + * ldlang.c (open_input_bfds): Don't change the bfd error + handler whilst loading symbols. + + 2001-05-02 Nick Clifton + * emultempl/aix.em: Replace buystring with xstrdup. + * emultempl/beos.em: Replace buystring with xstrdup. + 2001-06-07 Alan Modra * Many files: Update copyright notices. diff --git a/ld/emultempl/aix.em b/ld/emultempl/aix.em index f5f1c662727..de07f297f47 100644 --- a/ld/emultempl/aix.em +++ b/ld/emultempl/aix.em @@ -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; } diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em index f3e73a51e40..3c9e3edc9b2 100644 --- a/ld/emultempl/beos.em +++ b/ld/emultempl/beos.em @@ -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); diff --git a/ld/ldlang.c b/ld/ldlang.c index 4fe0ee934ec..f683abb1405 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -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. */