aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-02-13 22:23:33 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-02-13 22:23:33 +0000
commitb46a87b1606c5ea718c3e4ad97d6cb391501a916 (patch)
tree2eb3219b5c8b7ffa0896ad6830306a21983220b1 /ld/ldexp.c
parentc842b53ae1792ed3bc68759dee24dffdbf3bed32 (diff)
downloadgdb-b46a87b1606c5ea718c3e4ad97d6cb391501a916.zip
gdb-b46a87b1606c5ea718c3e4ad97d6cb391501a916.tar.gz
gdb-b46a87b1606c5ea718c3e4ad97d6cb391501a916.tar.bz2
2001-02-13 H.J. Lu <hjl@gnu.org>
* ldexp.h (node_type): Add etree_provided. * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node type to etree_provided if defined by PROVIDE. Allow updating for etree_provided. (exp_print_tree): Handle etree_provided. * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle etree_provided.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index cc34274..2b757fe 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -593,10 +593,11 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
case etree_assign:
case etree_provide:
+ case etree_provided:
if (tree->assign.dst[0] == '.' && tree->assign.dst[1] == 0)
{
/* Assignment to dot can only be done during allocation */
- if (tree->type.node_class == etree_provide)
+ if (tree->type.node_class != etree_assign)
einfo (_("%F%S can not PROVIDE assignment to location counter\n"));
if (allocation_done == lang_allocating_phase_enum
|| (allocation_done == lang_final_phase_enum
@@ -666,6 +667,8 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
h->type = bfd_link_hash_defined;
h->u.def.value = result.value;
h->u.def.section = result.section->bfd_section;
+ if (tree->type.node_class == etree_provide)
+ tree->type.node_class = etree_provided;
}
}
}
@@ -880,6 +883,7 @@ exp_print_tree (tree)
exp_print_tree (tree->assign.src);
break;
case etree_provide:
+ case etree_provided:
fprintf (config.map_file, "PROVIDE (%s, ", tree->assign.dst);
exp_print_tree (tree->assign.src);
fprintf (config.map_file, ")");