diff options
author | Alan Modra <amodra@gmail.com> | 2020-05-15 18:06:05 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-05-15 18:21:07 +0930 |
commit | 2a50b401465f74d7f3ee1654915b9070b4dc0fee (patch) | |
tree | 40b5b90d909e7fef28d2f4099d03f1a1ec5f84a8 /gas/ChangeLog | |
parent | a51951c25813b8d6c763f51d78d3756d9ca85ee1 (diff) | |
download | binutils-gdb-2a50b401465f74d7f3ee1654915b9070b4dc0fee.tar.gz |
Fix tight loop on recursively-defined symbols
This patch fixes a bug in GAS where the assembler enters a tight loop
when attempting to resolve recursively-defined symbols, e.g. when
trying to assemble "a=a".
This is a regression introduced between binutils 2.32 and 2.33,
by commit 1903f1385bff9
* symbols.c (struct local_symbol): Update comment.
(resolve_symbol_value): For resolved symbols equated to other
symbols, verify that the referenced symbol is not a local_symbol
before accessing sy_value. Don't leave symbol loops during
finalize_syms resolution.
* testsuite/gas/all/assign-bad-recursive.d: New test.
* testsuite/gas/all/assign-bad-recursive.l: Error output for test.
* testsuite/gas/all/assign-bad-recursive.s: Assembly for test.
* testsuite/gas/all/gas.exp: Run it.
Diffstat (limited to 'gas/ChangeLog')
-rw-r--r-- | gas/ChangeLog | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 3a1f406fd82..2a987616ece 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,16 @@ +2020-05-15 Alan Modra <amodra@gmail.com> + Alex Coplan <alex.coplan@arm.com> + + * symbols.c (struct local_symbol): Update comment. + (resolve_symbol_value): For resolved symbols equated to other + symbols, verify that the referenced symbol is not a local_symbol + before accessing sy_value. Don't leave symbol loops during + finalize_syms resolution. + * testsuite/gas/all/assign-bad-recursive.d: New test. + * testsuite/gas/all/assign-bad-recursive.l: Error output for test. + * testsuite/gas/all/assign-bad-recursive.s: Assembly for test. + * testsuite/gas/all/gas.exp: Run it. + 2020-05-14 Nick Clifton <nickc@redhat.com> * po/sv.po: Updated Swedish translation. |