aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-12-07 14:43:54 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-12-07 14:43:54 +0000
commitfe21a8fc74862995effcdc1d994a1dec827ca3ac (patch)
tree7929d7495d5823ad3ef0807115a40efb5b41ffd8 /bfd/elflink.c
parentcf54500c3c2c47c9e1fe915d154df4da2d28cec8 (diff)
downloadgdb-fe21a8fc74862995effcdc1d994a1dec827ca3ac.zip
gdb-fe21a8fc74862995effcdc1d994a1dec827ca3ac.tar.gz
gdb-fe21a8fc74862995effcdc1d994a1dec827ca3ac.tar.bz2
bfd/
2005-12-07 Thiemo Seufer <ths@networkno.de> H.J. Lu <hongjiu.lu@intel.com> PR ld/1932 * bfd-in.h (bfd_elf_record_link_assignment): Add output_bfd and hidden arguments. * bfd.c (bfd_hide_symbol): Removed. * bfd-in2.h: Regenerated. * elflink.c (bfd_elf_record_link_assignment): Handle hidden symbols which were provided by a linker script. ld/ 2005-12-07 Thiemo Seufer <ths@networkno.de> H.J. Lu <hongjiu.lu@intel.com> PR ld/1932 * emultempl/elf32.em (gld${EMULATION_NAME}_find_exp_assignment): Adjust bfd_elf_record_link_assignment call. * ldexp.c (exp_fold_tree_1): Remove call to bfd_hide_symbol.
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 1fcfce3..f31c5c1 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -424,9 +424,11 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info,
this in case some dynamic object refers to this symbol. */
bfd_boolean
-bfd_elf_record_link_assignment (struct bfd_link_info *info,
+bfd_elf_record_link_assignment (bfd *output_bfd,
+ struct bfd_link_info *info,
const char *name,
- bfd_boolean provide)
+ bfd_boolean provide,
+ bfd_boolean hidden)
{
struct elf_link_hash_entry *h;
struct elf_link_hash_table *htab;
@@ -473,6 +475,14 @@ bfd_elf_record_link_assignment (struct bfd_link_info *info,
h->def_regular = 1;
+ if (provide && hidden)
+ {
+ const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+
+ h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN;
+ (*bed->elf_backend_hide_symbol) (info, h, TRUE);
+ }
+
/* STV_HIDDEN and STV_INTERNAL symbols must be STB_LOCAL in shared objects
and executables. */
if (!info->relocatable