[binutils-gdb] PR26501, ASAN: tic54x_undefined_symbol tc-tic54x.c:5015

Alan Modra amodra@sourceware.org
Tue Aug 25 13:38:42 GMT 2020


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=69ff2100fdf663e1a8fa996236f63ed7e0fac95c

commit 69ff2100fdf663e1a8fa996236f63ed7e0fac95c
Author: Alan Modra <amodra@gmail.com>
Date:   Tue Aug 25 17:16:28 2020 +0930

    PR26501, ASAN: tic54x_undefined_symbol tc-tic54x.c:5015
    
            PR26501
            * gas/config/tc-tic54x.c (tic54x_undefined_symbol): Properly treat
            misc_symbol_hash entries without values.

Diff:
---
 gas/ChangeLog          |  6 ++++++
 gas/config/tc-tic54x.c | 11 +++--------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/gas/ChangeLog b/gas/ChangeLog
index 88eea23748c..d8c92dbe28e 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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
diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c
index 5fe1b2f92ea..cc2d2c048e5 100644
--- a/gas/config/tc-tic54x.c
+++ b/gas/config/tc-tic54x.c
@@ -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"))


More information about the Binutils-cvs mailing list