Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame^] | 1 | From 69b77a73f4e609883cd7a0946b407becd46bf918 Mon Sep 17 00:00:00 2001 |
| 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
| 3 | Date: Wed, 27 Feb 2019 15:12:32 +0530 |
| 4 | Subject: [PATCH 27/43] Revert "ld: Remove unused expression state" |
| 5 | |
| 6 | This reverts commit 65f14869fd3fbee8ed4c4ca49de8aaa86dbc66cb. |
| 7 | |
| 8 | Conflicts: |
| 9 | ld/ChangeLog |
| 10 | --- |
| 11 | ld/ldexp.c | 8 +++++--- |
| 12 | ld/ldexp.h | 1 + |
| 13 | 2 files changed, 6 insertions(+), 3 deletions(-) |
| 14 | |
| 15 | diff --git a/ld/ldexp.c b/ld/ldexp.c |
| 16 | index 60b17ef576..dac4b52450 100644 |
| 17 | --- a/ld/ldexp.c |
| 18 | +++ b/ld/ldexp.c |
| 19 | @@ -1354,6 +1354,7 @@ static etree_type * |
| 20 | exp_assop (const char *dst, |
| 21 | etree_type *src, |
| 22 | enum node_tree_enum class, |
| 23 | + bfd_boolean defsym, |
| 24 | bfd_boolean hidden) |
| 25 | { |
| 26 | etree_type *n; |
| 27 | @@ -1365,6 +1366,7 @@ exp_assop (const char *dst, |
| 28 | n->assign.type.node_class = class; |
| 29 | n->assign.src = src; |
| 30 | n->assign.dst = dst; |
| 31 | + n->assign.defsym = defsym; |
| 32 | n->assign.hidden = hidden; |
| 33 | return n; |
| 34 | } |
| 35 | @@ -1374,7 +1376,7 @@ exp_assop (const char *dst, |
| 36 | etree_type * |
| 37 | exp_assign (const char *dst, etree_type *src, bfd_boolean hidden) |
| 38 | { |
| 39 | - return exp_assop (dst, src, etree_assign, hidden); |
| 40 | + return exp_assop (dst, src, etree_assign, FALSE, hidden); |
| 41 | } |
| 42 | |
| 43 | /* Handle --defsym command-line option. */ |
| 44 | @@ -1382,7 +1384,7 @@ exp_assign (const char *dst, etree_type *src, bfd_boolean hidden) |
| 45 | etree_type * |
| 46 | exp_defsym (const char *dst, etree_type *src) |
| 47 | { |
| 48 | - return exp_assop (dst, src, etree_assign, FALSE); |
| 49 | + return exp_assop (dst, src, etree_assign, TRUE, FALSE); |
| 50 | } |
| 51 | |
| 52 | /* Handle PROVIDE. */ |
| 53 | @@ -1390,7 +1392,7 @@ exp_defsym (const char *dst, etree_type *src) |
| 54 | etree_type * |
| 55 | exp_provide (const char *dst, etree_type *src, bfd_boolean hidden) |
| 56 | { |
| 57 | - return exp_assop (dst, src, etree_provide, hidden); |
| 58 | + return exp_assop (dst, src, etree_provide, FALSE, hidden); |
| 59 | } |
| 60 | |
| 61 | /* Handle ASSERT. */ |
| 62 | diff --git a/ld/ldexp.h b/ld/ldexp.h |
| 63 | index 71395bc6c4..f94b00aedb 100644 |
| 64 | --- a/ld/ldexp.h |
| 65 | +++ b/ld/ldexp.h |
| 66 | @@ -66,6 +66,7 @@ typedef union etree_union { |
| 67 | node_type type; |
| 68 | const char *dst; |
| 69 | union etree_union *src; |
| 70 | + bfd_boolean defsym; |
| 71 | bfd_boolean hidden; |
| 72 | } assign; |
| 73 | struct { |
| 74 | -- |
| 75 | 2.17.1 |
| 76 | |