aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-05-06 14:38:24 +0930
committerAlan Modra <amodra@gmail.com>2019-05-06 16:23:33 +0930
commitbe0d3bbbcdbdba83f74d8ad1be6c4c759255af0b (patch)
tree56bf4e50f72b54a05cc825dab7431f35665408cd /gas
parent5a56d6a65f8406f1aadb4569fbb8ff00a6e92d02 (diff)
downloadgdb-be0d3bbbcdbdba83f74d8ad1be6c4c759255af0b.zip
gdb-be0d3bbbcdbdba83f74d8ad1be6c4c759255af0b.tar.gz
gdb-be0d3bbbcdbdba83f74d8ad1be6c4c759255af0b.tar.bz2
sym->sy_value is not valid for struct local_symbol
Fixes this mep-elf error: gas/elf/dwarf2-19.s: Error: Unknown expression operator (enum 0) gas/elf/dwarf2-19.s: Error: cannot convert expression symbol .L2 to complex relocation * symbols.c (symbol_relc_make_sym): Do not access sym->sy_value directly.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/symbols.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 640fee1..ec21153 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2019-05-06 Alan Modra <amodra@gmail.com>
+ * symbols.c (symbol_relc_make_sym): Do not access sym->sy_value
+ directly.
+
+2019-05-06 Alan Modra <amodra@gmail.com>
+
* config/tc-ppc.c (ppc_fix_adjustable): Exclude all GOT and PLT
relocs, and VLE sdarel relocs.
* testsuite/gas/ppc/power4.d: Adjust.
diff --git a/gas/symbols.c b/gas/symbols.c
index 9786795..10d7b1c 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -3288,7 +3288,7 @@ symbol_relc_make_sym (symbolS * sym)
is defined as an expression or a plain value. */
if ( S_GET_SEGMENT (sym) == expr_section
|| S_GET_SEGMENT (sym) == absolute_section)
- return symbol_relc_make_expr (& sym->sy_value);
+ return symbol_relc_make_expr (symbol_get_value_expression (sym));
/* This may be a "fake symbol", referring to ".".
Write out a special null symbol to refer to this position. */