From: Alan Modra Date: Mon, 22 Mar 2004 22:58:04 +0000 (+0000) Subject: include/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b9cf773d1a267941d84772b54847c931f11bdec5;p=binutils-gdb.git include/ PR 51. * bfdlink.h (struct bfd_link_info): Add wrap_char. bfd/ PR 51. * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char. ld/ PR 51. * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set link_info.wrap_char. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 595dd3f517c..18964a785e7 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2004-03-23 Alan Modra + + PR 51. + * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char. + 2004-03-22 Hans-Peter Nilsson * elf32-cris.c (cris_elf_relocate_section) wrap_hash != NULL) { const char *l; + char prefix = '\0'; l = string; - if (*l == bfd_get_symbol_leading_char (abfd)) - ++l; + if (*l == bfd_get_symbol_leading_char (abfd) || *l == info->wrap_char) + { + prefix = *l; + ++l; + } #undef WRAP #define WRAP "__wrap_" @@ -544,8 +548,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd, if (n == NULL) return NULL; - /* Note that symbol_leading_char may be '\0'. */ - n[0] = bfd_get_symbol_leading_char (abfd); + n[0] = prefix; n[1] = '\0'; strcat (n, WRAP); strcat (n, l); @@ -576,8 +579,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd, if (n == NULL) return NULL; - /* Note that symbol_leading_char may be '\0'. */ - n[0] = bfd_get_symbol_leading_char (abfd); + n[0] = prefix; n[1] = '\0'; strcat (n, l + sizeof REAL - 1); h = bfd_link_hash_lookup (info->hash, n, create, TRUE, follow); diff --git a/include/ChangeLog b/include/ChangeLog index e018e9b1b97..7f600049a1b 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2004-03-23 Alan Modra + + PR 51. + * bfdlink.h (struct bfd_link_info): Add wrap_char. + 2004-03-20 H.J. Lu * bfdlink.h (bfd_link_info): Correct comments for the @@ -542,8 +547,8 @@ Tue May 30 16:53:34 2000 Andrew Cagney 2000-05-06 Zack Weinberg - * ansidecl.h: #define __extension__ to nothing if - GCC_VERSION < 2008. + * ansidecl.h: #define __extension__ to nothing if + GCC_VERSION < 2008. 2000-05-04 Kaveh R. Ghazi @@ -788,8 +793,8 @@ Tue Feb 24 13:05:02 1998 Doug Evans Tue Feb 17 12:32:18 1998 Andrew Cagney * remote-sim.h (sim_fetch_register, sim_store_register): Add - register length parameter. Functions return actual length of - register. + register length parameter. Functions return actual length of + register. Thu Feb 12 16:29:01 1998 Ian Lance Taylor @@ -847,7 +852,7 @@ Tue Nov 25 01:35:52 1997 Doug Evans Sat Nov 22 23:34:15 1997 Andrew Cagney * remote-sim.h (sim_stop_reason): Clarify sim_signalled SIGRC - argument. + argument. Mon Nov 17 14:00:51 1997 Doug Evans @@ -918,7 +923,7 @@ Tue Jul 22 17:59:54 1997 Ian Lance Taylor Fri Jun 6 13:02:33 1997 Andrew Cagney - * remote-sim.h (sim_kill): Mark as depreciated. + * remote-sim.h (sim_kill): Mark as deprecated. Fri May 23 13:43:41 1997 Fred Fish @@ -927,12 +932,12 @@ Fri May 23 13:43:41 1997 Fred Fish Thu May 22 11:32:49 1997 Andrew Cagney * remote-sim.h: Review documentation. Clarify restrictions on - when functions can be called. + when functions can be called. Wed May 21 16:47:53 1997 Andrew Cagney * remote-sim.h (sim_set_profile_size): Add prototype, document as - depreciated. + deprecated. Tue May 20 09:32:22 1997 Andrew Cagney @@ -966,16 +971,16 @@ Tue Apr 22 10:24:34 1997 Fred Fish Fri Apr 18 13:04:49 1997 Andrew Cagney * remote-sim.h (sim_stop): New interface - asynchronous - notification of a request to stop / suspend the running - simulation. + notification of a request to stop / suspend the running + simulation. * remote-sim.h (enum sim_stop): Add sim_running and sim_polling as - states for use internal to simulators. + states for use internal to simulators. * callback.h (struct host_callback_strut): Put a magic number at - the end of the struct to allow basic checking. + the end of the struct to allow basic checking. (struct host_callback_struct ): Add poll_quit - so - that the console etc can be polled at regular intervals. + that the console etc can be polled at regular intervals. Thu Apr 17 02:17:12 1997 Doug Evans @@ -986,7 +991,7 @@ Thu Apr 17 02:17:12 1997 Doug Evans Wed Apr 2 17:09:12 1997 Andrew Cagney * remote-sim.h (sim_trace, sim_size): Make these global. They - will go away shortly. + will go away shortly. Wed Apr 2 15:23:49 1997 Doug Evans @@ -1016,7 +1021,7 @@ Mon Mar 17 19:22:12 1997 Ian Lance Taylor Mon Mar 17 14:57:55 1997 Andrew Cagney * remote-sim.h: New file, copied in from gdb/remote-sim.h. One - day this will be placed in a directory of its own. + day this will be placed in a directory of its own. Sat Mar 15 19:00:14 1997 Ian Lance Taylor @@ -1025,8 +1030,8 @@ Sat Mar 15 19:00:14 1997 Ian Lance Taylor Thu Mar 6 15:46:59 1997 Andrew Cagney * callback.h (struct host_callback_struct): Add callbacks - - flush_stdout, write_stderr, flush_stderr, vprintf_filtered, - evprintf_filtered. Delete redundant callbacks - printf_filtered. + flush_stdout, write_stderr, flush_stderr, vprintf_filtered, + evprintf_filtered. Delete redundant callbacks - printf_filtered. Thu Feb 27 23:18:27 1997 Ian Lance Taylor @@ -1138,7 +1143,7 @@ Tue Jul 23 17:37:58 1996 Fred Fish can define PRIVATE_XMALLOC and then define xmalloc and xrealloc anyway they want. (basename): Document in source that we can't declare the - parameter type because it is declared inconsistently across + parameter type because it is declared inconsistently across different systems. Mon Jul 22 13:16:13 1996 Richard Henderson @@ -1933,8 +1938,8 @@ Sat Nov 30 20:46:43 1991 Steve Chamberlain (sac at rtl.cygnus.com) Wed Nov 27 10:38:31 1991 Steve Chamberlain (sac at rtl.cygnus.com) * internalcoff.h: (internal_scnhdr) took out #def dependency, now - s_nreloc and s_nlnno are always long. (internal_reloc): allways - has an offset field now. + s_nreloc and s_nlnno are always long. + (internal_reloc): Always has an offset field now. Fri Nov 22 08:12:58 1991 John Gilmore (gnu at cygnus.com) diff --git a/include/bfdlink.h b/include/bfdlink.h index 96c9886c00d..cc2043e10ed 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -1,6 +1,6 @@ /* bfdlink.h -- header file for BFD link routines - Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003 - Free Software Foundation, Inc. + Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, + 2004 Free Software Foundation, Inc. Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -323,6 +323,11 @@ struct bfd_link_info whether to include an object from an archive. */ enum bfd_link_common_skip_ar_aymbols common_skip_ar_aymbols; + /* Char that may appear as the first char of a symbol, but should be + skipped (like symbol_leading_char) when looking up symbols in + wrap_hash. Used by PowerPC Linux for 'dot' symbols. */ + char wrap_char; + /* Function callbacks. */ const struct bfd_link_callbacks *callbacks; diff --git a/ld/ChangeLog b/ld/ChangeLog index c319829efe7..f962891cb0f 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2004-03-23 Alan Modra + + PR 51. + * emultempl/ppc64elf.em (ppc_create_output_section_statements): Set + link_info.wrap_char. + 2004-03-20 H.J. Lu * lexsup.c (parse_args): Don't set unresolved_syms_in_objects @@ -76,7 +82,7 @@ 2004-02-23 Alan Modra * ldexp.c (fold_tree): Follow indirect symbols. - + 2004-02-20 Nathan Sidwell * ldgram.y (exp): Add two operand ALIGN. diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index 5746f797383..22ed608c297 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -1,5 +1,5 @@ # This shell script emits a C file. -*- C -*- -# Copyright 2002, 2003 Free Software Foundation, Inc. +# Copyright 2002, 2003, 2004 Free Software Foundation, Inc. # # This file is part of GLD, the Gnu Linker. # @@ -65,6 +65,8 @@ ppc_create_output_section_statements (void) && link_info.hash->creator != &bfd_elf64_powerpcle_vec) return; + link_info.wrap_char = '.'; + stub_file = lang_add_input_file ("linker stubs", lang_input_file_is_fake_enum, NULL);