summaryrefslogtreecommitdiff
path: root/ld/ldgram.y
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2005-08-05 13:52:13 +0000
committerH.J. Lu <hjl@lucon.org>2005-08-05 13:52:13 +0000
commitead0700b97a141c5f4ae240669952fa09f8d3a99 (patch)
tree47e2fece200da2268b7e18981a9bac236cecbf7d /ld/ldgram.y
parent269673994e3ce6b48f0e00e85b68575eb810d5a3 (diff)
downloadbinutils-redhat-ead0700b97a141c5f4ae240669952fa09f8d3a99.tar.gz
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/ldgram.y')
-rw-r--r--ld/ldgram.y8
1 files changed, 6 insertions, 2 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y
index 2d5b07429a..44896e1dd4 100644
--- a/ld/ldgram.y
+++ b/ld/ldgram.y
@@ -142,7 +142,7 @@ static int error_index;
%token STARTUP HLL SYSLIB FLOAT NOFLOAT NOCROSSREFS
%token ORIGIN FILL
%token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS
-%token ALIGNMOD AT SUBALIGN PROVIDE AS_NEEDED
+%token ALIGNMOD AT SUBALIGN PROVIDE PROVIDE_HIDDEN AS_NEEDED
%type <token> assign_op atype attributes_opt sect_constraint
%type <name> filename
%token CHIP LIST SECT ABSOLUTE LOAD NEWLINE ENDWORD ORDER NAMEWORD ASSERT_K
@@ -648,7 +648,11 @@ assignment:
}
| PROVIDE '(' NAME '=' mustbe_exp ')'
{
- lang_add_assignment (exp_provide ($3, $5));
+ lang_add_assignment (exp_provide ($3, $5, FALSE));
+ }
+ | PROVIDE_HIDDEN '(' NAME '=' mustbe_exp ')'
+ {
+ lang_add_assignment (exp_provide ($3, $5, TRUE));
}
;