diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2005-08-05 13:52:13 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2005-08-05 13:52:13 +0000 |
commit | 7af8e99880a8084cb4a18ad4d7f1f62cb440573e (patch) | |
tree | d35d1995000de059bbb0c4f01ac57b6e28e68911 /bfd | |
parent | 9599dfb1f6cb3b03d685d8cb0a8829ee803dfa89 (diff) | |
download | gdb-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')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 4 | ||||
-rw-r--r-- | bfd/bfd.c | 26 |
3 files changed, 35 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index db023c9..ced5b40 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2005-08-05 H.J. Lu <hongjiu.lu@intel.com> + + * bfd.c (bfd_hide_symbol): New. + * bfd-in2.h: Regenerated. + 2005-08-04 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf64_x86_64_merge_symbol): When mixing a diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 8ca1d6f..1c99cc2 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -4486,6 +4486,10 @@ void bfd_preserve_restore (bfd *, struct bfd_preserve *); void bfd_preserve_finish (bfd *, struct bfd_preserve *); +void bfd_hide_symbol + (bfd *, struct bfd_link_info *, + struct bfd_link_hash_entry *, bfd_boolean); + /* Extracted from archive.c. */ symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); @@ -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); +} |