[PATCH v3] x86: Disallow GOT memory access beyond its GOT slot
H.J. Lu
hjl.tools@gmail.com
Sun Feb 9 01:34:26 GMT 2025
Since GOT slot size is 32 bits for i386 and 64 bits for x86-64, disallow
GOT memory access beyond its GOT slot.
PR gas/32624
* config/tc-i386.c (check_GOT_memory): New function.
(output_disp): Call check_GOT_memory to check valid GOT memory
access.
* testsuite/gas/i386/got.s: Add vector instructions with
byte/word/dword GOT memory.
* testsuite/gas/i386/got-no-relax.d: Updated.
* testsuite/gas/i386/got.d: Likewise.
* testsuite/gas/i386/x86-64-gotpcrel-2.d: Likewise.
* testsuite/gas/i386/i386.exp: Run inval-got.
* testsuite/gas/i386/inval-got.l: New file.
* testsuite/gas/i386/inval-got.s: Likewise.
* testsuite/gas/i386/x86-64-inval-got.l: Likewise.
* testsuite/gas/i386/x86-64-inval-got.l: Likewise.
* testsuite/gas/i386/x86-64-gotpcrel-2.s: Add vector instructions
with byte/word/dword/qword GOT memory.
* testsuite/gas/i386/x86-64.exp: Run x86-64-inval-got.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v3-0001-x86-Disallow-GOT-memory-access-beyond-its-GOT-slo.patch
Type: text/x-patch
Size: 12027 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20250209/e50bfcbd/attachment-0001.bin>
More information about the Binutils
mailing list