x86: reject relocations involving registers
authorJan Beulich <jbeulich@suse.com>
Wed, 23 Mar 2022 11:31:29 +0000 (12:31 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 23 Mar 2022 11:31:29 +0000 (12:31 +0100)
commite52a16f2aa20773f42c28bf91a568d0683e5767c
treee591957158986d497d4aa013a975cd55115767fb
parent64d23078e30e54e1bb095962540e4c6138edaf5a
x86: reject relocations involving registers

To prevent fatal or even internal errors, add a simple check to
i386_validate_fix(), rejecting relocations when their target symbol is
an equate of a register (or resolved to reg_section for any other
reason).
gas/config/tc-i386.c
gas/testsuite/gas/i386/inval-equ-2.l