aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2018-01-05 14:59:05 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2018-01-11 17:35:35 +0000
commit65f14869fd3fbee8ed4c4ca49de8aaa86dbc66cb (patch)
tree86cbdac54e94dd82d63c28f6177fec4134d5e2b1
parenteab62f2f018417121e2520acb0623985b1708b02 (diff)
downloadgdb-65f14869fd3fbee8ed4c4ca49de8aaa86dbc66cb.zip
gdb-65f14869fd3fbee8ed4c4ca49de8aaa86dbc66cb.tar.gz
gdb-65f14869fd3fbee8ed4c4ca49de8aaa86dbc66cb.tar.bz2
ld: Remove unused expression state
Previous commit removed all uses of the defsym field within the linker expression union. This commit cleans up the now redundant state. ld/ChangeLog: * ldexp.h (union etree_union): Remove defsym field. * ldexp.c (exp_assop): Remove defsym parameter, and use of defsym parameter. (exp_assign): Remove passing of defsym parameter. (exp_defsym): Likewise. (exp_provide): Likewise.
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/ldexp.c8
-rw-r--r--ld/ldexp.h1
3 files changed, 12 insertions, 6 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 956a856..83545d5 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,14 @@
2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
+ * ldexp.h (union etree_union): Remove defsym field.
+ * ldexp.c (exp_assop): Remove defsym parameter, and use of defsym
+ parameter.
+ (exp_assign): Remove passing of defsym parameter.
+ (exp_defsym): Likewise.
+ (exp_provide): Likewise.
+
+2018-01-11 Andrew Burgess <andrew.burgess@embecosm.com>
+
* ldexp.c (exp_fold_tree_1): Rework condition underwhich provide
nodes are ignored in the tree walk, and move the location at which
we change provide nodes into provided nodes.
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 6398a2d..a097205 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -1338,7 +1338,6 @@ static etree_type *
exp_assop (const char *dst,
etree_type *src,
enum node_tree_enum class,
- bfd_boolean defsym,
bfd_boolean hidden)
{
etree_type *n;
@@ -1350,7 +1349,6 @@ exp_assop (const char *dst,
n->assign.type.node_class = class;
n->assign.src = src;
n->assign.dst = dst;
- n->assign.defsym = defsym;
n->assign.hidden = hidden;
return n;
}
@@ -1360,7 +1358,7 @@ exp_assop (const char *dst,
etree_type *
exp_assign (const char *dst, etree_type *src, bfd_boolean hidden)
{
- return exp_assop (dst, src, etree_assign, FALSE, hidden);
+ return exp_assop (dst, src, etree_assign, hidden);
}
/* Handle --defsym command-line option. */
@@ -1368,7 +1366,7 @@ exp_assign (const char *dst, etree_type *src, bfd_boolean hidden)
etree_type *
exp_defsym (const char *dst, etree_type *src)
{
- return exp_assop (dst, src, etree_assign, TRUE, FALSE);
+ return exp_assop (dst, src, etree_assign, FALSE);
}
/* Handle PROVIDE. */
@@ -1376,7 +1374,7 @@ exp_defsym (const char *dst, etree_type *src)
etree_type *
exp_provide (const char *dst, etree_type *src, bfd_boolean hidden)
{
- return exp_assop (dst, src, etree_provide, FALSE, hidden);
+ return exp_assop (dst, src, etree_provide, hidden);
}
/* Handle ASSERT. */
diff --git a/ld/ldexp.h b/ld/ldexp.h
index 572b703..d58cacb 100644
--- a/ld/ldexp.h
+++ b/ld/ldexp.h
@@ -66,7 +66,6 @@ typedef union etree_union {
node_type type;
const char *dst;
union etree_union *src;
- bfd_boolean defsym;
bfd_boolean hidden;
} assign;
struct {