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> 2004-03-22 Hans-Peter Nilsson <hp@axis.com>
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT, * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,

View file

@ -1,6 +1,6 @@
/* linker.c -- BFD linker routines /* linker.c -- BFD linker routines
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
Free Software Foundation, Inc. 2003, 2004 Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
This file is part of BFD, the Binary File Descriptor library. 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) if (info->wrap_hash != NULL)
{ {
const char *l; const char *l;
char prefix = '\0';
l = string; l = string;
if (*l == bfd_get_symbol_leading_char (abfd)) if (*l == bfd_get_symbol_leading_char (abfd) || *l == info->wrap_char)
{
prefix = *l;
++l; ++l;
}
#undef WRAP #undef WRAP
#define WRAP "__wrap_" #define WRAP "__wrap_"
@ -544,8 +548,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
if (n == NULL) if (n == NULL)
return NULL; return NULL;
/* Note that symbol_leading_char may be '\0'. */ n[0] = prefix;
n[0] = bfd_get_symbol_leading_char (abfd);
n[1] = '\0'; n[1] = '\0';
strcat (n, WRAP); strcat (n, WRAP);
strcat (n, l); strcat (n, l);
@ -576,8 +579,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
if (n == NULL) if (n == NULL)
return NULL; return NULL;
/* Note that symbol_leading_char may be '\0'. */ n[0] = prefix;
n[0] = bfd_get_symbol_leading_char (abfd);
n[1] = '\0'; n[1] = '\0';
strcat (n, l + sizeof REAL - 1); strcat (n, l + sizeof REAL - 1);
h = bfd_link_hash_lookup (info->hash, n, create, TRUE, follow); 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> 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
* bfdlink.h (bfd_link_info): Correct comments for the * bfdlink.h (bfd_link_info): Correct comments for the
@ -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> 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> Fri May 23 13:43:41 1997 Fred Fish <fnf@cygnus.com>
@ -932,7 +937,7 @@ Thu May 22 11:32:49 1997 Andrew Cagney <cagney@b1.cygnus.com>
Wed May 21 16:47:53 1997 Andrew Cagney <cagney@b1.cygnus.com> Wed May 21 16:47:53 1997 Andrew Cagney <cagney@b1.cygnus.com>
* remote-sim.h (sim_set_profile_size): Add prototype, document as * 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> Tue May 20 09:32:22 1997 Andrew Cagney <cagney@b1.cygnus.com>
@ -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) Wed Nov 27 10:38:31 1991 Steve Chamberlain (sac at rtl.cygnus.com)
* internalcoff.h: (internal_scnhdr) took out #def dependency, now * internalcoff.h: (internal_scnhdr) took out #def dependency, now
s_nreloc and s_nlnno are always long. (internal_reloc): allways s_nreloc and s_nlnno are always long.
has an offset field now. (internal_reloc): Always has an offset field now.
Fri Nov 22 08:12:58 1991 John Gilmore (gnu at cygnus.com) 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 /* bfdlink.h -- header file for BFD link routines
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003 Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003,
Free Software Foundation, Inc. 2004 Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support. Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library. 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. */ whether to include an object from an archive. */
enum bfd_link_common_skip_ar_aymbols common_skip_ar_aymbols; 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. */ /* Function callbacks. */
const struct bfd_link_callbacks *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> 2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
* lexsup.c (parse_args): Don't set unresolved_syms_in_objects * lexsup.c (parse_args): Don't set unresolved_syms_in_objects

View file

@ -1,5 +1,5 @@
# This shell script emits a C file. -*- C -*- # 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. # 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) && link_info.hash->creator != &bfd_elf64_powerpcle_vec)
return; return;
link_info.wrap_char = '.';
stub_file = lang_add_input_file ("linker stubs", stub_file = lang_add_input_file ("linker stubs",
lang_input_file_is_fake_enum, lang_input_file_is_fake_enum,
NULL); NULL);