]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86/Intel: don't modify equates' expressions
authorJan Beulich <jbeulich@suse.com>
Mon, 20 Apr 2026 06:38:35 +0000 (08:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 20 Apr 2026 06:38:35 +0000 (08:38 +0200)
commit22f8905d9f38011727c85ab828d2c0aeaf980a83
treeef9e0c0dcfef3df22832b8e6c38b2182c0386850
parentd1b63466b9ebbe0fcf00409ff473cbc97b365a66
x86/Intel: don't modify equates' expressions

Equates involving registers were mis-treated when parsing insn operand
expressions: When "pulling out" the register(s), they would have got
converted to O_constant. While other (local) parsing code was able to cope
with this, the generic part of the assembler was misled. A visible bad
effect would be that local absolute symbols would appear in the symbol
table, when really that should be register symbols (which wouldn't be put
in the symbol table at all).

Clone symbols / expressions as necessary before modifying them.
gas/config/tc-i386-intel.c
gas/config/tc-i386.c
gas/testsuite/gas/i386/equ2.d [new file with mode: 0644]
gas/testsuite/gas/i386/i386.exp