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.
This commit is contained in:
Alan Modra 2004-03-22 22:58:04 +00:00
parent 8e645ae742
commit b9cf773d1a
6 changed files with 58 additions and 33 deletions

View file

@ -1,3 +1,8 @@
2004-03-23 Alan Modra <amodra@bigpond.net.au>
PR 51.
* linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
2004-03-22 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
@ -10,7 +15,7 @@
(elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
a PLT reloc to GOT for an executable.
(elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
.got for a DSO and explain why.
.got for a DSO and explain why.
(elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
and unreferenced symbols for which a PLT is defined. Adjust
dynamic-symbol pruning correspondingly, to make sure we don't lose

View file

@ -1,6 +1,6 @@
/* linker.c -- BFD linker routines
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 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.
@ -523,10 +523,14 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
if (info->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);

View file

@ -1,3 +1,8 @@
2004-03-23 Alan Modra <amodra@bigpond.net.au>
PR 51.
* bfdlink.h (struct bfd_link_info): Add wrap_char.
2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
* bfdlink.h (bfd_link_info): Correct comments for the
@ -542,8 +547,8 @@ Tue May 30 16:53:34 2000 Andrew Cagney <cagney@b1.cygnus.com>
2000-05-06 Zack Weinberg <zack@wolery.cumb.org>
* 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 <ghazi@caip.rutgers.edu>
@ -788,8 +793,8 @@ Tue Feb 24 13:05:02 1998 Doug Evans <devans@canuck.cygnus.com>
Tue Feb 17 12:32:18 1998 Andrew Cagney <cagney@b1.cygnus.com>
* 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 <ian@cygnus.com>
@ -847,7 +852,7 @@ Tue Nov 25 01:35:52 1997 Doug Evans <devans@seba.cygnus.com>
Sat Nov 22 23:34:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
* remote-sim.h (sim_stop_reason): Clarify sim_signalled SIGRC
argument.
argument.
Mon Nov 17 14:00:51 1997 Doug Evans <devans@seba.cygnus.com>
@ -918,7 +923,7 @@ Tue Jul 22 17:59:54 1997 Ian Lance Taylor <ian@cygnus.com>
Fri Jun 6 13:02:33 1997 Andrew Cagney <cagney@b1.cygnus.com>
* 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 <fnf@cygnus.com>
@ -927,12 +932,12 @@ Fri May 23 13:43:41 1997 Fred Fish <fnf@cygnus.com>
Thu May 22 11:32:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
* 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 <cagney@b1.cygnus.com>
* remote-sim.h (sim_set_profile_size): Add prototype, document as
depreciated.
deprecated.
Tue May 20 09:32:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
@ -966,16 +971,16 @@ Tue Apr 22 10:24:34 1997 Fred Fish <fnf@cygnus.com>
Fri Apr 18 13:04:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
* 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 <dje@canuck.cygnus.com>
@ -986,7 +991,7 @@ Thu Apr 17 02:17:12 1997 Doug Evans <dje@canuck.cygnus.com>
Wed Apr 2 17:09:12 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
* 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 <dje@canuck.cygnus.com>
@ -1016,7 +1021,7 @@ Mon Mar 17 19:22:12 1997 Ian Lance Taylor <ian@cygnus.com>
Mon Mar 17 14:57:55 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
* 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 <ian@cygnus.com>
@ -1025,8 +1030,8 @@ Sat Mar 15 19:00:14 1997 Ian Lance Taylor <ian@cygnus.com>
Thu Mar 6 15:46:59 1997 Andrew Cagney <cagney@kremvax.cygnus.com>
* 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 <ian@cygnus.com>
@ -1138,7 +1143,7 @@ Tue Jul 23 17:37:58 1996 Fred Fish <fnf@cygnus.com>
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 <rth@tamu.edu>
@ -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)

View file

@ -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;

View file

@ -1,3 +1,9 @@
2004-03-23 Alan Modra <amodra@bigpond.net.au>
PR 51.
* emultempl/ppc64elf.em (ppc_create_output_section_statements): Set
link_info.wrap_char.
2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
* lexsup.c (parse_args): Don't set unresolved_syms_in_objects
@ -76,7 +82,7 @@
2004-02-23 Alan Modra <amodra@bigpond.net.au>
* ldexp.c (fold_tree): Follow indirect symbols.
2004-02-20 Nathan Sidwell <nathan@codesourcery.com>
* ldgram.y (exp): Add two operand ALIGN.

View file

@ -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);