]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
x86/AT&T: make GOT-relative expressions work master
authorJan Beulich <jbeulich@suse.com>
Fri, 10 Apr 2026 06:43:22 +0000 (08:43 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 10 Apr 2026 06:43:22 +0000 (08:43 +0200)
commit65e4798d49afe18c20acd5f5830e706b175ba844
treed22eed9edef528b1d27af063880b780252a65249
parent0b1b1d661542862a20f77a2a0f9049926ac37569
x86/AT&T: make GOT-relative expressions work

The expressions used in intel-got{32,64}.s should equally work (or not) in
AT&T mode. Changing the Intel syntax parser such that O_symbol wouldn't
happen to be wrapped around such expressions breaks it there, too. It
really isn't correct to limit this to just O_symbol. Permitting O_add and
O_subtract as well requires taking care of the other operand as well then.
(Strictly speaking non-zero offsets aren't very useful here, but then at
least with an equate of 0 this ought to work. The non-zero offset in the
testcase helps demonstrate that this offset isn't lost.)
gas/config/tc-i386.c
gas/testsuite/gas/i386/x86-64-gotpcrel-2.d
gas/testsuite/gas/i386/x86-64-gotpcrel-2.s