aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-tic54x.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-08-25 17:16:28 +0930
committerAlan Modra <amodra@gmail.com>2020-08-25 23:07:10 +0930
commit69ff2100fdf663e1a8fa996236f63ed7e0fac95c (patch)
treee6fb42b5d5673454dfed63946bcfe93a6eaa752f /gas/config/tc-tic54x.c
parent1de153a16817c8b2807749911c39ed96a0698b88 (diff)
downloadfsf-binutils-gdb-69ff2100fdf663e1a8fa996236f63ed7e0fac95c.zip
fsf-binutils-gdb-69ff2100fdf663e1a8fa996236f63ed7e0fac95c.tar.gz
fsf-binutils-gdb-69ff2100fdf663e1a8fa996236f63ed7e0fac95c.tar.bz2
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.
Diffstat (limited to 'gas/config/tc-tic54x.c')
-rw-r--r--gas/config/tc-tic54x.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c
index 5fe1b2f..cc2d2c0 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"))