summaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2012-08-06 22:27:49 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2012-08-06 22:27:49 +0000
commitc5ddaa3c6b455edb6dfded81a16c534423bd100e (patch)
tree95468e820fafc27024c6043f8eeca9ad263ddb4c /ld/emultempl
parent6993545d5650fa77e75e9ae4b52c5703a53c53cc (diff)
downloadbinutils-redhat-c5ddaa3c6b455edb6dfded81a16c534423bd100e.tar.gz
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/emultempl')
-rw-r--r--ld/emultempl/beos.em3
-rw-r--r--ld/emultempl/pe.em7
-rw-r--r--ld/emultempl/pep.em7
-rw-r--r--ld/emultempl/spuelf.em2
-rw-r--r--ld/emultempl/xtensaelf.em2
5 files changed, 12 insertions, 9 deletions
diff --git a/ld/emultempl/beos.em b/ld/emultempl/beos.em
index 2071d8ef99..f59e000dea 100644
--- a/ld/emultempl/beos.em
+++ b/ld/emultempl/beos.em
@@ -348,7 +348,8 @@ gld_${EMULATION_NAME}_set_symbols (void)
for (j = 0; init[j].ptr; j++)
{
long val = init[j].value;
- lang_add_assignment (exp_assign (init[j].symbol, exp_intop (val)));
+ lang_add_assignment (exp_assign (init[j].symbol, exp_intop (val),
+ FALSE));
if (init[j].size == sizeof(short))
*(short *)init[j].ptr = val;
else if (init[j].size == sizeof(int))
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 947f6ad71f..a565eb7f78 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -944,7 +944,7 @@ gld_${EMULATION_NAME}_set_symbols (void)
lang_assignment_statement_type *rv;
rv = lang_add_assignment (exp_assign (GET_INIT_SYMBOL_NAME (j),
- exp_intop (val)));
+ exp_intop (val), FALSE));
if (init[j].size == sizeof (short))
*(short *) init[j].ptr = val;
else if (init[j].size == sizeof (int))
@@ -1721,8 +1721,9 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
= pe_def_file->base_address;
init[IMAGEBASEOFF].inited = 1;
if (image_base_statement)
- image_base_statement->exp = exp_assign ("__image_base__",
- exp_intop (pe.ImageBase));
+ image_base_statement->exp
+ = exp_assign ("__image_base__", exp_intop (pe.ImageBase),
+ FALSE);
}
if (pe_def_file->stack_reserve != -1
diff --git a/ld/emultempl/pep.em b/ld/emultempl/pep.em
index d3f5c83b9c..fc3cdc3943 100644
--- a/ld/emultempl/pep.em
+++ b/ld/emultempl/pep.em
@@ -856,7 +856,7 @@ gld_${EMULATION_NAME}_set_symbols (void)
lang_assignment_statement_type *rv;
rv = lang_add_assignment (exp_assign (GET_INIT_SYMBOL_NAME (j),
- exp_intop (val)));
+ exp_intop (val), FALSE));
if (init[j].size == sizeof (short))
*(short *) init[j].ptr = (short) val;
else if (init[j].size == sizeof (int))
@@ -1522,8 +1522,9 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
= pep_def_file->base_address;
init[IMAGEBASEOFF].inited = 1;
if (image_base_statement)
- image_base_statement->exp = exp_assign ("__image_base__",
- exp_intop (pep.ImageBase));
+ image_base_statement->exp
+ = exp_assign ("__image_base__", exp_intop (pep.ImageBase),
+ FALSE);
}
if (pep_def_file->stack_reserve != -1
diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em
index eef57aa7cc..1b35612233 100644
--- a/ld/emultempl/spuelf.em
+++ b/ld/emultempl/spuelf.em
@@ -165,7 +165,7 @@ spu_place_special_section (asection *s, asection *o, const char *output_name)
push_stat_ptr (&os->children);
e_size = exp_intop (params.line_size - s->size);
- lang_add_assignment (exp_assign (".", e_size));
+ lang_add_assignment (exp_assign (".", e_size, FALSE));
pop_stat_ptr ();
}
lang_add_section (&os->children, s, NULL, os);
diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em
index b37a67b2fe..1e6eb0751c 100644
--- a/ld/emultempl/xtensaelf.em
+++ b/ld/emultempl/xtensaelf.em
@@ -1887,7 +1887,7 @@ ld_xtensa_insert_page_offsets (bfd_vma dot,
etree_type *name_op = exp_nameop (NAME, ".");
etree_type *addend_op = exp_intop (1 << xtensa_page_power);
etree_type *add_op = exp_binop ('+', name_op, addend_op);
- etree_type *assign_op = exp_assign (".", add_op);
+ etree_type *assign_op = exp_assign (".", add_op, FALSE);
lang_assignment_statement_type *assign_stmt;
lang_statement_union_type *assign_union;