diff options
author | Alan Modra <amodra@gmail.com> | 2020-08-23 21:05:34 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-08-24 21:48:08 +0930 |
commit | 12c4b9aad5e45fa38e31801e13f50b730925c913 (patch) | |
tree | 8940621f7a4bc39bd2fd08edd80c12cd17ea4bb1 /gas/config/tc-tic54x.c | |
parent | 252dcdf432c67f6baafb766ed068c64db1eb2bad (diff) | |
download | fsf-binutils-gdb-12c4b9aad5e45fa38e31801e13f50b730925c913.zip fsf-binutils-gdb-12c4b9aad5e45fa38e31801e13f50b730925c913.tar.gz fsf-binutils-gdb-12c4b9aad5e45fa38e31801e13f50b730925c913.tar.bz2 |
tic54x fixes
A number of the tic54x tests were failing, and I thought it worth
investigating since the target makes use of a lot of hash tables, and
we've just changed gas hash tables. It turns out none of the gas
failures were due to hashing.
* config/tc-tic54x.c (stag_add_field_symbols): Don't free "name"
in case where it isn't copied.
* config/tc-tic54x.h (LOCAL_LABELS_FB): Undef.
* testsuite/gas/tic54x/field.d: Dump section contents and symbols
rather than disassembling.
* testsuite/gas/tic54x/set.d: Adjust for newer disassembly.
Diffstat (limited to 'gas/config/tc-tic54x.c')
-rw-r--r-- | gas/config/tc-tic54x.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gas/config/tc-tic54x.c b/gas/config/tc-tic54x.c index 62d49d9..5fe1b2f 100644 --- a/gas/config/tc-tic54x.c +++ b/gas/config/tc-tic54x.c @@ -551,6 +551,7 @@ stag_add_field_symbols (struct stag *stag, while (field != NULL) { char *name = concat (prefix, field->name, NULL); + char *freename = name; if (rootsym == NULL) { @@ -568,6 +569,7 @@ stag_add_field_symbols (struct stag *stag, replacement = concat (S_GET_NAME (rootsym), "+", root_stag_name, name + strlen (S_GET_NAME (rootsym)), NULL); str_hash_insert (subsym_hash[0], name, replacement, 0); + freename = NULL; } /* Recurse if the field is a structure. @@ -577,7 +579,7 @@ stag_add_field_symbols (struct stag *stag, field->offset, rootsym, root_stag_name); field = field->next; - free (name); + free (freename); } free (prefix); } |