aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-05-18 13:30:59 +0930
committerAndreas K. Hüttel <dilfridge@gentoo.org>2020-07-31 03:22:09 +0300
commitd73501eccf4bc0bc0948b2f6326d8d86a5a2eec6 (patch)
treec13e4d62a25392f95a57d63641dcc95e5b751d1d
parentFix tight loop on recursively-defined symbols (diff)
downloadbinutils-gdb-d73501eccf4bc0bc0948b2f6326d8d86a5a2eec6.tar.gz
binutils-gdb-d73501eccf4bc0bc0948b2f6326d8d86a5a2eec6.tar.bz2
binutils-gdb-d73501eccf4bc0bc0948b2f6326d8d86a5a2eec6.zip
Re: Fix tight loop on recursively-defined symbols
sy_resolving ought to not be set for a struct local_symbol, but it is apparent from local_symbol_make that the field is not initialised. * symbols.c (resolve_symbol_value): Invoke LOCAL_SYMBOL_CHECK before looking at add_symbol->sy_flags.sy_resolving. (cherry picked from commit d402189f2faa0aaa9fb8ad4669fdf0059946cd8a) (cherry picked from commit 8524bb5bd28a9275ea38eaf3187badd13d15f5f2)
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/symbols.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 7a623e8b86..0ee9056472 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-18 Alan Modra <amodra@gmail.com>
+
+ * symbols.c (resolve_symbol_value): Invoke LOCAL_SYMBOL_CHECK
+ before looking at add_symbol->sy_flags.
+
2020-05-15 Alan Modra <amodra@gmail.com>
Alex Coplan <alex.coplan@arm.com>
diff --git a/gas/symbols.c b/gas/symbols.c
index 9bae085e68..acdab3f5e0 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -1389,6 +1389,7 @@ resolve_symbol_value (symbolS *symp)
/* Don't leave symbol loops. */
if (finalize_syms
+ && !LOCAL_SYMBOL_CHECK (add_symbol)
&& add_symbol->sy_flags.sy_resolving)
break;