PR26501, ASAN: tic54x_undefined_symbol tc-tic54x.c:5015
authorAlan Modra <amodra@gmail.com>
Tue, 25 Aug 2020 07:46:28 +0000 (17:16 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 25 Aug 2020 13:37:10 +0000 (23:07 +0930)
PR26501
* gas/config/tc-tic54x.c (tic54x_undefined_symbol): Properly treat
misc_symbol_hash entries without values.

gas/ChangeLog
gas/config/tc-tic54x.c

index 88eea23748ca61a714292b7b8bda270a413970a5..d8c92dbe28ed91c68a12b2539b91a15cab06083c 100644 (file)
@@ -1,3 +1,9 @@
+2020-08-25  Alan Modra  <amodra@gmail.com>
+
+       PR26501
+       * gas/config/tc-tic54x.c (tic54x_undefined_symbol): Properly treat
+       misc_symbol_hash entries without values.
+
 2020-08-25  Alan Modra  <amodra@gmail.com>
 
        PR 26500
index 5fe1b2f92ea0779e5465dd8077c469812095abae..cc2d2c048e5e1733eda70088fc929d7a79c49dea 100644 (file)
@@ -5008,14 +5008,9 @@ tic54x_undefined_symbol (char *name)
   if ((sym = (tic54x_symbol *) str_hash_find (cc_hash, name)) != NULL
       || (sym = (tic54x_symbol *) str_hash_find (cc2_hash, name)) != NULL
       || (sym = (tic54x_symbol *) str_hash_find (cc3_hash, name)) != NULL
-      || (sym = (tic54x_symbol *) str_hash_find (misc_symbol_hash,
-                                                name)) != NULL
-      || (sym = (tic54x_symbol *) str_hash_find (sbit_hash, name)) != NULL)
-    {
-      return symbol_new (name, reg_section, &zero_address_frag, sym->value);
-    }
-
-  if ((sym = (tic54x_symbol *) str_hash_find (reg_hash, name)) != NULL
+      || str_hash_find (misc_symbol_hash, name) != NULL
+      || (sym = (tic54x_symbol *) str_hash_find (sbit_hash, name)) != NULL
+      || (sym = (tic54x_symbol *) str_hash_find (reg_hash, name)) != NULL
       || (sym = (tic54x_symbol *) str_hash_find (mmreg_hash, name)) != NULL
       || !strcasecmp (name, "a")
       || !strcasecmp (name, "b"))