aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-08-05 13:52:13 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-08-05 13:52:13 +0000
commit7af8e99880a8084cb4a18ad4d7f1f62cb440573e (patch)
treed35d1995000de059bbb0c4f01ac57b6e28e68911 /bfd/bfd.c
parent9599dfb1f6cb3b03d685d8cb0a8829ee803dfa89 (diff)
downloadgdb-7af8e99880a8084cb4a18ad4d7f1f62cb440573e.zip
gdb-7af8e99880a8084cb4a18ad4d7f1f62cb440573e.tar.gz
gdb-7af8e99880a8084cb4a18ad4d7f1f62cb440573e.tar.bz2
bfd/
2005-08-05 H.J. Lu <hongjiu.lu@intel.com> * bfd.c (bfd_hide_symbol): New. * bfd-in2.h: Regenerated. ld/ 2005-08-05 H.J. Lu <hongjiu.lu@intel.com> * ld.texinfo: Document PROVIDE_HIDDEN. * ldexp.c (exp_fold_tree_1): Hide a provided symbol if asked. (exp_provide): Add and set hidden. * ldexp.h (etree_type): Add hidden to assign. * ldgram.y (PROVIDE_HIDDEN): New. * ldlex.l (PROVIDE_HIDDEN): Likewise. * scripttempl/elf.sc: Use PROVIDE_HIDDEN on array bound symbols.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 908d794..c8be739 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1508,3 +1508,29 @@ bfd_preserve_finish (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_preserve *preserve)
objalloc. */
bfd_hash_table_free (&preserve->section_htab);
}
+
+/*
+FUNCTION
+ bfd_hide_symbol
+
+SYNOPSIS
+ void bfd_hide_symbol (bfd *,
+ struct bfd_link_info *,
+ struct bfd_link_hash_entry *,
+ bfd_boolean);
+
+DESCRIPTION
+ This function hides a symbol so that it won't be exported.
+
+*/
+
+void
+bfd_hide_symbol (bfd *abfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_hash_entry *h,
+ bfd_boolean force_local)
+{
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ (get_elf_backend_data (abfd)->elf_backend_hide_symbol)
+ (link_info, (struct elf_link_hash_entry *) h, force_local);
+}