mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
d774bf9b36
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.
355 lines
8.9 KiB
Plaintext
355 lines
8.9 KiB
Plaintext
/* config.in. Generated from configure.ac by autoheader. */
|
|
|
|
/* Check that config.h is #included before system headers
|
|
(this works only for glibc, but that should be enough). */
|
|
#if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__)
|
|
# error config.h must be #included before system headers
|
|
#endif
|
|
#define __CONFIG_H__ 1
|
|
|
|
/* Define if building universal (internal helper macro) */
|
|
#undef AC_APPLE_UNIVERSAL_BUILD
|
|
|
|
/* Define if using AIX 5.2 value for C_WEAKEXT. */
|
|
#undef AIX_WEAK_SUPPORT
|
|
|
|
/* assert broken? */
|
|
#undef BROKEN_ASSERT
|
|
|
|
/* Compiling cross-assembler? */
|
|
#undef CROSS_COMPILE
|
|
|
|
/* Default architecture. */
|
|
#undef DEFAULT_ARCH
|
|
|
|
/* Default compression algorithm for --enable-compressed-debug-sections. */
|
|
#undef DEFAULT_COMPRESSED_DEBUG_ALGORITHM
|
|
|
|
/* Default CRIS architecture. */
|
|
#undef DEFAULT_CRIS_ARCH
|
|
|
|
/* Default emulation. */
|
|
#undef DEFAULT_EMULATION
|
|
|
|
/* Define if you want compressed debug sections by default. */
|
|
#undef DEFAULT_FLAG_COMPRESS_DEBUG
|
|
|
|
/* Define to 1 if you want to generate GNU Build attribute notes by default,
|
|
if none are contained in the input. */
|
|
#undef DEFAULT_GENERATE_BUILD_NOTES
|
|
|
|
/* Define to 1 if you want to generate ELF common symbols with the STT_COMMON
|
|
type by default. */
|
|
#undef DEFAULT_GENERATE_ELF_STT_COMMON
|
|
|
|
/* Define to 1 if you want to generate x86 relax relocations by default. */
|
|
#undef DEFAULT_GENERATE_X86_RELAX_RELOCATIONS
|
|
|
|
/* Define to 1 if you want to fix Loongson3 LLSC Errata by default. */
|
|
#undef DEFAULT_MIPS_FIX_LOONGSON3_LLSC
|
|
|
|
/* Define default value for RISC-V -march. */
|
|
#undef DEFAULT_RISCV_ARCH_WITH_EXT
|
|
|
|
/* Define to 1 if you want to generate RISC-V arch attribute by default. */
|
|
#undef DEFAULT_RISCV_ATTR
|
|
|
|
/* Define default value for RISC-V -misa-spec. */
|
|
#undef DEFAULT_RISCV_ISA_SPEC
|
|
|
|
/* Define default value for RISC-V -mpriv-spec */
|
|
#undef DEFAULT_RISCV_PRIV_SPEC
|
|
|
|
/* Define to 1 if you want to check x86 TLS relocation by default. */
|
|
#undef DEFAULT_X86_TLS_CHECK
|
|
|
|
/* Define to 1 if you want to generate GNU x86 used ISA and feature properties
|
|
by default. */
|
|
#undef DEFAULT_X86_USED_NOTE
|
|
|
|
/* Supported emulations. */
|
|
#undef EMULATIONS
|
|
|
|
/* Define if you want run-time sanity checks. */
|
|
#undef ENABLE_CHECKING
|
|
|
|
/* Define to 1 if translation of program messages to the user's native
|
|
language is requested. */
|
|
#undef ENABLE_NLS
|
|
|
|
/* Define to 1 if you have the Mac OS X function
|
|
CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */
|
|
#undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES
|
|
|
|
/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
|
|
the CoreFoundation framework. */
|
|
#undef HAVE_CFPREFERENCESCOPYAPPVALUE
|
|
|
|
/* Define if the GNU dcgettext() function is already present or preinstalled.
|
|
*/
|
|
#undef HAVE_DCGETTEXT
|
|
|
|
/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
|
|
don't. */
|
|
#undef HAVE_DECL_ASPRINTF
|
|
|
|
/* Is the prototype for getopt in <unistd.h> in the expected format? */
|
|
#undef HAVE_DECL_GETOPT
|
|
|
|
/* Define to 1 if you have the declaration of `mempcpy', and to 0 if you
|
|
don't. */
|
|
#undef HAVE_DECL_MEMPCPY
|
|
|
|
/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
|
|
*/
|
|
#undef HAVE_DECL_STPCPY
|
|
|
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
|
#undef HAVE_DLFCN_H
|
|
|
|
/* Define if the GNU gettext() function is already present or preinstalled. */
|
|
#undef HAVE_GETTEXT
|
|
|
|
/* Define if you have the iconv() function and it works. */
|
|
#undef HAVE_ICONV
|
|
|
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
|
#undef HAVE_INTTYPES_H
|
|
|
|
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
|
#undef HAVE_LC_MESSAGES
|
|
|
|
/* Define to 1 if you have the <memory.h> header file. */
|
|
#undef HAVE_MEMORY_H
|
|
|
|
/* Define to 1 if you have the <stdint.h> header file. */
|
|
#undef HAVE_STDINT_H
|
|
|
|
/* Define to 1 if you have the <stdlib.h> header file. */
|
|
#undef HAVE_STDLIB_H
|
|
|
|
/* Define to 1 if you have the <strings.h> header file. */
|
|
#undef HAVE_STRINGS_H
|
|
|
|
/* Define to 1 if you have the <string.h> header file. */
|
|
#undef HAVE_STRING_H
|
|
|
|
/* Define to 1 if you have the `strsignal' function. */
|
|
#undef HAVE_STRSIGNAL
|
|
|
|
/* Define if <sys/stat.h> has struct stat.st_mtim.tv_nsec */
|
|
#undef HAVE_ST_MTIM_TV_NSEC
|
|
|
|
/* Define if <sys/stat.h> has struct stat.st_mtim.tv_sec */
|
|
#undef HAVE_ST_MTIM_TV_SEC
|
|
|
|
/* Define to 1 if you have the <sys/stat.h> header file. */
|
|
#undef HAVE_SYS_STAT_H
|
|
|
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
#undef HAVE_SYS_TYPES_H
|
|
|
|
/* Define if <time.h> has struct tm.tm_gmtoff. */
|
|
#undef HAVE_TM_GMTOFF
|
|
|
|
/* Define to 1 if you have the <unistd.h> header file. */
|
|
#undef HAVE_UNISTD_H
|
|
|
|
/* Define to 1 if you have the <windows.h> header file. */
|
|
#undef HAVE_WINDOWS_H
|
|
|
|
/* Define to 1 if zstd is enabled. */
|
|
#undef HAVE_ZSTD
|
|
|
|
/* Using i386 COFF? */
|
|
#undef I386COFF
|
|
|
|
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
|
*/
|
|
#undef LT_OBJDIR
|
|
|
|
/* Default CPU for MIPS targets. */
|
|
#undef MIPS_CPU_STRING_DEFAULT
|
|
|
|
/* Generate 64-bit code by default on MIPS targets. */
|
|
#undef MIPS_DEFAULT_64BIT
|
|
|
|
/* Choose a default ABI for MIPS targets. */
|
|
#undef MIPS_DEFAULT_ABI
|
|
|
|
/* Define value for nds32_arch_name */
|
|
#undef NDS32_DEFAULT_ARCH_NAME
|
|
|
|
/* Define default value for nds32_audio_ext */
|
|
#undef NDS32_DEFAULT_AUDIO_EXT
|
|
|
|
/* Define default value for nds32_dsp_ext */
|
|
#undef NDS32_DEFAULT_DSP_EXT
|
|
|
|
/* Define default value for nds32_dx_regs */
|
|
#undef NDS32_DEFAULT_DX_REGS
|
|
|
|
/* Define default value for nds32_perf_ext */
|
|
#undef NDS32_DEFAULT_PERF_EXT
|
|
|
|
/* Define default value for nds32_perf_ext2 */
|
|
#undef NDS32_DEFAULT_PERF_EXT2
|
|
|
|
/* Define default value for nds32_string_ext */
|
|
#undef NDS32_DEFAULT_STRING_EXT
|
|
|
|
/* Define default value for nds32_zol_ext */
|
|
#undef NDS32_DEFAULT_ZOL_EXT
|
|
|
|
/* Define default value for nds32_linux_toolchain */
|
|
#undef NDS32_LINUX_TOOLCHAIN
|
|
|
|
/* Define if environ is not declared in system header files. */
|
|
#undef NEED_DECLARATION_ENVIRON
|
|
|
|
/* Define if ffs is not declared in system header files. */
|
|
#undef NEED_DECLARATION_FFS
|
|
|
|
/* a.out support? */
|
|
#undef OBJ_MAYBE_AOUT
|
|
|
|
/* COFF support? */
|
|
#undef OBJ_MAYBE_COFF
|
|
|
|
/* ECOFF support? */
|
|
#undef OBJ_MAYBE_ECOFF
|
|
|
|
/* ELF support? */
|
|
#undef OBJ_MAYBE_ELF
|
|
|
|
/* generic support? */
|
|
#undef OBJ_MAYBE_GENERIC
|
|
|
|
/* SOM support? */
|
|
#undef OBJ_MAYBE_SOM
|
|
|
|
/* Name of package */
|
|
#undef PACKAGE
|
|
|
|
/* Define to the address where bug reports for this package should be sent. */
|
|
#undef PACKAGE_BUGREPORT
|
|
|
|
/* Define to the full name of this package. */
|
|
#undef PACKAGE_NAME
|
|
|
|
/* Define to the full name and version of this package. */
|
|
#undef PACKAGE_STRING
|
|
|
|
/* Define to the one symbol short name of this package. */
|
|
#undef PACKAGE_TARNAME
|
|
|
|
/* Define to the home page for this package. */
|
|
#undef PACKAGE_URL
|
|
|
|
/* Define to the version of this package. */
|
|
#undef PACKAGE_VERSION
|
|
|
|
/* Define to 1 if you have the ANSI C header files. */
|
|
#undef STDC_HEADERS
|
|
|
|
/* Using strict COFF? */
|
|
#undef STRICTCOFF
|
|
|
|
/* Target alias. */
|
|
#undef TARGET_ALIAS
|
|
|
|
/* Define as 1 if big endian. */
|
|
#undef TARGET_BYTES_BIG_ENDIAN
|
|
|
|
/* Canonical target. */
|
|
#undef TARGET_CANONICAL
|
|
|
|
/* Target CPU. */
|
|
#undef TARGET_CPU
|
|
|
|
/* Target OS. */
|
|
#undef TARGET_OS
|
|
|
|
/* Define if default target is PowerPC Solaris. */
|
|
#undef TARGET_SOLARIS_COMMENT
|
|
|
|
/* Target vendor. */
|
|
#undef TARGET_VENDOR
|
|
|
|
/* Target specific CPU. */
|
|
#undef TARGET_WITH_CPU
|
|
|
|
/* Use b modifier when opening binary files? */
|
|
#undef USE_BINARY_FOPEN
|
|
|
|
/* Allow use of EF_MIPS_ABI_O32 on MIPS targets. */
|
|
#undef USE_EF_MIPS_ABI_O32
|
|
|
|
/* Use emulation support? */
|
|
#undef USE_EMULATIONS
|
|
|
|
/* Enable extensions on AIX 3, Interix. */
|
|
#ifndef _ALL_SOURCE
|
|
# undef _ALL_SOURCE
|
|
#endif
|
|
/* Enable GNU extensions on systems that have them. */
|
|
#ifndef _GNU_SOURCE
|
|
# undef _GNU_SOURCE
|
|
#endif
|
|
/* Enable threading extensions on Solaris. */
|
|
#ifndef _POSIX_PTHREAD_SEMANTICS
|
|
# undef _POSIX_PTHREAD_SEMANTICS
|
|
#endif
|
|
/* Enable extensions on HP NonStop. */
|
|
#ifndef _TANDEM_SOURCE
|
|
# undef _TANDEM_SOURCE
|
|
#endif
|
|
/* Enable general extensions on Solaris. */
|
|
#ifndef __EXTENSIONS__
|
|
# undef __EXTENSIONS__
|
|
#endif
|
|
|
|
|
|
/* Using cgen code? */
|
|
#undef USING_CGEN
|
|
|
|
/* Version number of package */
|
|
#undef VERSION
|
|
|
|
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
|
significant byte first (like Motorola and SPARC, unlike Intel). */
|
|
#if defined AC_APPLE_UNIVERSAL_BUILD
|
|
# if defined __BIG_ENDIAN__
|
|
# define WORDS_BIGENDIAN 1
|
|
# endif
|
|
#else
|
|
# ifndef WORDS_BIGENDIAN
|
|
# undef WORDS_BIGENDIAN
|
|
# endif
|
|
#endif
|
|
|
|
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
|
|
`char[]'. */
|
|
#undef YYTEXT_POINTER
|
|
|
|
/* Enable large inode numbers on Mac OS X 10.5. */
|
|
#ifndef _DARWIN_USE_64_BIT_INODE
|
|
# define _DARWIN_USE_64_BIT_INODE 1
|
|
#endif
|
|
|
|
/* Number of bits in a file offset, on hosts where this is settable. */
|
|
#undef _FILE_OFFSET_BITS
|
|
|
|
/* Define for large files, on AIX-style hosts. */
|
|
#undef _LARGE_FILES
|
|
|
|
/* Define to 1 if on MINIX. */
|
|
#undef _MINIX
|
|
|
|
/* Define to 2 if the system does not provide POSIX.1 features except with
|
|
this defined. */
|
|
#undef _POSIX_1_SOURCE
|
|
|
|
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
|
#undef _POSIX_SOURCE
|