aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.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 /ld/ldexp.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 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 6c3c717..d0ecb0c 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -740,6 +740,8 @@ exp_fold_tree_1 (etree_type *tree)
defined by some object. */
break;
}
+ if (tree->assign.hidden)
+ bfd_hide_symbol (output_bfd, &link_info, h, TRUE);
}
exp_fold_tree_1 (tree->assign.src);
@@ -884,7 +886,7 @@ exp_assop (int code, const char *dst, etree_type *src)
/* Handle PROVIDE. */
etree_type *
-exp_provide (const char *dst, etree_type *src)
+exp_provide (const char *dst, etree_type *src, bfd_boolean hidden)
{
etree_type *n;
@@ -893,6 +895,7 @@ exp_provide (const char *dst, etree_type *src)
n->assign.type.node_class = etree_provide;
n->assign.src = src;
n->assign.dst = dst;
+ n->assign.hidden = hidden;
return n;
}