]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Re: Fix tight loop on recursively-defined symbols
authorAlan Modra <amodra@gmail.com>
Mon, 18 May 2020 04:00:59 +0000 (13:30 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 18 May 2020 04:16:27 +0000 (13:46 +0930)
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.

gas/ChangeLog
gas/symbols.c

index 3b8ea166f0c2dd5ad710c01840a25cbf6a9680b0..7fb6b5d0b4ba995e5de3b05faa45c4045a14d222 100644 (file)
@@ -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.
index 711730daf1c644b4b5647a5a236406bb1aae272f..b1376a57b49584c648721bb4ad051ff96e57a20e 100644 (file)
@@ -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;