[binutils-gdb] Re: Fix tight loop on recursively-defined symbols
Alan Modra
amodra@sourceware.org
Mon May 18 08:10:32 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d402189f2faa0aaa9fb8ad4669fdf0059946cd8a
commit d402189f2faa0aaa9fb8ad4669fdf0059946cd8a
Author: Alan Modra <amodra@gmail.com>
Date: Mon May 18 13:30:59 2020 +0930
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.
Diff:
---
gas/ChangeLog | 5 +++++
gas/symbols.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3b8ea166f0c..7fb6b5d0b4b 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-18 Hongtao Liu <hongtao.liu@intel.com>
* config/tc-i386.c: Not handle lret/iret.
diff --git a/gas/symbols.c b/gas/symbols.c
index 711730daf1c..b1376a57b49 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;
More information about the Binutils-cvs
mailing list