[PATCH 4/4] ld: Remove unused expression state
Andrew Burgess
andrew.burgess@embecosm.com
Tue Jan 9 21:09:00 GMT 2018
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.
---
ld/ChangeLog | 9 +++++++++
ld/ldexp.c | 8 +++-----
ld/ldexp.h | 1 -
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 9508bad4a56..832f1dfb9f6 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -1339,7 +1339,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;
@@ -1351,7 +1350,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;
}
@@ -1361,7 +1359,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. */
@@ -1369,7 +1367,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. */
@@ -1377,7 +1375,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 572b703c203..d58cacba1c5 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 {
--
2.14.3
More information about the Binutils
mailing list