diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2012-08-06 22:27:52 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2012-08-06 22:27:52 +0000 |
commit | eb8476a6e2fc115c0a953392e61ab27c7568a2a8 (patch) | |
tree | 30b9014e6f4c62bd312650473ada0a1cc4b315a8 /ld/ldgram.y | |
parent | de88229846525b2afb4a8b85b7f60f3246d3e90d (diff) | |
download | gdb-eb8476a6e2fc115c0a953392e61ab27c7568a2a8.zip gdb-eb8476a6e2fc115c0a953392e61ab27c7568a2a8.tar.gz gdb-eb8476a6e2fc115c0a953392e61ab27c7568a2a8.tar.bz2 |
bfd/
* elflink.c (bfd_elf_record_link_assignment): Remove --defsym
symbols special case.
ld/
* ldexp.h (etree_union): Add defsym member to the assign member
structure.
(exp_assign): Add hidden argument to prototype.
* ldexp.c (exp_fold_tree_1): Use the defsym member to handle
--defsym symbols.
(exp_assop): Add defsym argument, initialize the defsym member
of the assign structure.
(exp_assign): Handle hidden symbols.
(exp_defsym): Update to use the defsym argument to exp_assop.
(exp_provide): Update to handle the defsym argument to exp_assop.
* ldlex.l (HIDDEN): New token.
* ldgram.y (HIDDEN): Likewise.
(assignment, section): Update calls to exp_assign.
* ldctor.c (ldctor_build_sets): Likewise.
* mri.c (mri_format): Likewise.
* ldlang.c (lang_insert_orphan, lang_leave_overlay): Likewise.
(open_input_bfds): Remove --defsym symbols special case.
* emultempl/beos.em (gld_${EMULATION_NAME}_set_symbols): Update
call to exp_assign.
* emultempl/pe.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
* emultempl/pep.em (gld_${EMULATION_NAME}_set_symbols): Likewise.
* emultempl/spuelf.em (spu_place_special_section): Likewise.
* emultempl/xtensaelf.em (ld_xtensa_insert_page_offsets):
Likewise.
* ld.texinfo (Assigning Values to Symbols): Add HIDDEN.
(HIDDEN): New subsection.
Diffstat (limited to 'ld/ldgram.y')
-rw-r--r-- | ld/ldgram.y | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ld/ldgram.y b/ld/ldgram.y index 6e00118..ee88196 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -146,7 +146,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 PROVIDE_HIDDEN AS_NEEDED +%token ALIGNMOD AT SUBALIGN HIDDEN 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 @@ -759,7 +759,7 @@ end: ';' | ',' assignment: NAME '=' mustbe_exp { - lang_add_assignment (exp_assign ($1, $3)); + lang_add_assignment (exp_assign ($1, $3, FALSE)); } | NAME assign_op mustbe_exp { @@ -767,7 +767,11 @@ assignment: exp_binop ($2, exp_nameop (NAME, $1), - $3))); + $3), FALSE)); + } + | HIDDEN '(' NAME '=' mustbe_exp ')' + { + lang_add_assignment (exp_assign ($3, $5, TRUE)); } | PROVIDE '(' NAME '=' mustbe_exp ')' { @@ -1085,7 +1089,7 @@ section: NAME { ldlex_expression(); } opt_exp_with_type { ldlex_popstate (); - lang_add_assignment (exp_assign (".", $3)); + lang_add_assignment (exp_assign (".", $3, FALSE)); } '{' sec_or_group_p1 '}' | INCLUDE filename |