binutils-gdb/gas/doc
Cui, Lili d774bf9b36 x86: Add tls check in gas
Assembler shouldn't accept invalid TLS instructions, TLS relocations
can only be used with specific instructions as specified in TLS psABI
and linker issues an error when TLS relocations are used with wrong
instructions or format. Since it is inconvenient for gcc to rely on
linker to report errors, adding TLS check in the assembler stage so
that gcc can know TLS errors earlier.

gas/ChangeLog:

        PR gas/32022
        * config.in: Regenerate.
        * config/tc-i386.c
        *(enum x86_tls_error_type): New.
        *(struct _i386_insn): Added has_gotrel to indicate whether TLS
	relocations need to be checked.
        (x86_check_tls_relocation): Added a new function to check TLS
	relocation.
        (x86_report_tls_error): Created a new function to report TLS error.
        (i386_assemble): Handle x86_check_tls_relocation.
        (lex_got): Set i.has_gotrel.
        (OPTION_MTLS_CHECK): Added a new option to contrl TLS check.
        (struct option): Ditto.
        (md_parse_option): Ditto.
        (md_show_usage): Ditto.
        * configure.ac: Added a new option to check TLS relocation by
	default.
        * configure: Regenerated.
        * doc/c-i386.texi: Document -mtls-check=.
        * testsuite/gas/i386/i386.exp: Added new tests.
        * testsuite/gas/i386/ilp32/ilp32.exp: Ditto.
        * testsuite/gas/i386/ilp32/reloc64.d: Disable TLS check for it.
        * testsuite/gas/i386/ilp32/x32-tls.d: Ditto.
        * testsuite/gas/i386/inval-tls.l: Added more test cases.
        * testsuite/gas/i386/inval-tls.s: Ditto.
        * testsuite/gas/i386/reloc32.d: Disable TLS check for it.
        * testsuite/gas/i386/reloc64.d: Ditto.
        * testsuite/gas/i386/x86-64-inval-tls.l: Added more test cases.
        * testsuite/gas/i386/x86-64-inval-tls.s: Ditto.
        * testsuite/gas/i386/x86-64.exp: Added new tests.
        * testsuite/gas/i386/ilp32/x32-inval-tls.l: New test.
        * testsuite/gas/i386/ilp32/x32-inval-tls.s: Ditto.
        * testsuite/gas/i386/ilp32/x86-64-tls.d: Ditto.
        * testsuite/gas/i386/tls.d: Ditto.
        * testsuite/gas/i386/tls.s: Ditto.
        * testsuite/gas/i386/x86-64-tls.d: Ditto.
        * testsuite/gas/i386/x86-64-tls.s: Ditto.

ld/ChangeLog:

        PR gas/32022
        * testsuite/ld-i386/tlsgdesc1.d: Disable TLS check for it.
        * testsuite/ld-i386/tlsgdesc2.d: Ditto.
        * testsuite/ld-i386/tlsie2.d: Ditto.
        * testsuite/ld-i386/tlsie3.d: Ditto.
        * testsuite/ld-i386/tlsie4.d: Ditto.
        * testsuite/ld-i386/tlsie5.d: Ditto.
        * testsuite/ld-i386/tlsgdesc3.d: Ditto.
        * testsuite/ld-x86-64/tlsdesc3.d: Ditto.
        * testsuite/ld-x86-64/tlsdesc4.d: Ditto.
        * testsuite/ld-x86-64/tlsie2.d: Ditto.
        * testsuite/ld-x86-64/tlsie3.d: Ditto.
        * testsuite/ld-x86-64/tlsie5.d: Ditto.
        * testsuite/ld-x86-64/tlsdesc5.d: Ditto.
2024-09-21 05:19:16 +08:00
..
all.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
as.texi gas/doc: adjust an @xref 2024-07-31 12:03:23 +02:00
c-aarch64.texi aarch64: disable feature b16b16 2024-07-12 11:05:35 +01:00
c-alpha.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-arc.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-arm.texi arm: minor documentation cleanup given removal of FPA 2024-06-05 17:45:45 +01:00
c-avr.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-bfin.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-bpf.texi bpf: there is no ldinddw nor ldabsdw instructions 2024-01-29 19:22:41 +01:00
c-cr16.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-cris.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-csky.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-d10v.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-d30v.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-epiphany.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-h8300.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-hppa.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-i386.texi x86: Add tls check in gas 2024-09-21 05:19:16 +08:00
c-ia64.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-ip2k.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-kvx.texi gas/doc: fix several typos 2024-01-08 13:53:49 +00:00
c-lm32.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-loongarch.texi gas/doc: fix several typos 2024-01-08 13:53:49 +00:00
c-m32c.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-m32r.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-m68hc11.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-m68k.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-metag.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-microblaze.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-mips.texi MIPS/GAS: Handle --trap command-line option dynamically 2024-07-19 09:42:56 +01:00
c-mmix.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-msp430.texi gas/doc: fix several typos 2024-01-08 13:53:49 +00:00
c-mt.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-nds32.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-nios2.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-ns32k.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-or1k.texi gas/doc: fix several typos 2024-01-08 13:53:49 +00:00
c-pdp11.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-pj.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-ppc.texi PowerPC: Add support for Power11 options 2024-02-09 10:52:23 -06:00
c-pru.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-riscv.texi RISC-V: Add support for XCVsimd extension in CV32E40P 2024-09-03 12:02:28 +08:00
c-rl78.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-rx.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-s12z.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-s390.texi s390: Document syntax to omit base register operand 2024-09-09 17:05:27 +02:00
c-score.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-sh.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-sparc.texi gas/doc: fix several typos 2024-01-08 13:53:49 +00:00
c-tic6x.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-tic54x.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-tilegx.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-tilepro.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-v850.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-vax.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-visium.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-wasm32.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-xgate.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-xstormy16.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-xtensa.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-z8k.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
c-z80.texi gas/doc: fix several typos 2024-01-08 13:53:49 +00:00
fdl.texi
h8.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
internals.texi Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30
local.mk Update year range in copyright notice of binutils files 2024-01-04 22:58:12 +10:30