summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2004-03-22 22:58:02 +0000
committerAlan Modra <amodra@bigpond.net.au>2004-03-22 22:58:02 +0000
commit655b7ac0a24eca1174ce2e150362b622e74fb3c4 (patch)
tree8b96518fe81079397f56a9636a7df959aebce1cc /bfd
parent2922cdf905ab9ac73f05358d28f0f333c64f5633 (diff)
downloadgdb-655b7ac0a24eca1174ce2e150362b622e74fb3c4.tar.gz
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/linker.c18
2 files changed, 16 insertions, 9 deletions
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 <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
diff --git a/bfd/linker.c b/bfd/linker.c
index c55fb9338ad..58befc3632e 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -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);