diff options
author | Alan Modra <amodra@gmail.com> | 2020-05-18 13:30:59 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-05-18 17:49:31 +0930 |
commit | 3730a015c05cde8d151f94bef20e43ea2bf96ccc (patch) | |
tree | e6f6c954631c03c9ccb3fc191fa6bc2763702823 | |
parent | 47bb52072023bfc8238e7a4e44dcf35fccf3059e (diff) | |
download | gdb-3730a015c05cde8d151f94bef20e43ea2bf96ccc.zip gdb-3730a015c05cde8d151f94bef20e43ea2bf96ccc.tar.gz gdb-3730a015c05cde8d151f94bef20e43ea2bf96ccc.tar.bz2 |
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)
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/symbols.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 2734505..3c9ab9d 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 c178266..774afd3 100644 --- a/gas/symbols.c +++ b/gas/symbols.c @@ -1387,6 +1387,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; |