Commit Graph

122950 Commits

Author SHA1 Message Date
GDB Administrator
04e95b86f5 Automatic date update in version.in 2025-10-24 00:02:18 +00:00
GDB Administrator
f170c99fdd Automatic date update in version.in 2025-10-23 00:04:57 +00:00
GDB Administrator
d2b1c8a104 Automatic date update in version.in 2025-10-22 00:02:49 +00:00
GDB Administrator
eb9af94279 Automatic date update in version.in 2025-10-21 00:02:18 +00:00
GDB Administrator
fd5f22cdb4 Automatic date update in version.in 2025-10-20 00:04:17 +00:00
GDB Administrator
f8c88e75e3 Automatic date update in version.in 2025-10-19 00:01:48 +00:00
GDB Administrator
19dec6b19e Automatic date update in version.in 2025-10-18 00:00:38 +00:00
GDB Administrator
41d6d2a92b Automatic date update in version.in 2025-10-17 00:01:36 +00:00
GDB Administrator
b4d362c6f1 Automatic date update in version.in 2025-10-16 00:02:51 +00:00
GDB Administrator
dcb6d88b74 Automatic date update in version.in 2025-10-15 00:02:54 +00:00
GDB Administrator
e786c058a7 Automatic date update in version.in 2025-10-14 00:04:58 +00:00
GDB Administrator
9b9691dda4 Automatic date update in version.in 2025-10-13 00:02:22 +00:00
GDB Administrator
dbdcba4b98 Automatic date update in version.in 2025-10-12 00:00:45 +00:00
GDB Administrator
04f1bc0ee5 Automatic date update in version.in 2025-10-11 00:01:07 +00:00
GDB Administrator
e49e6f5013 Automatic date update in version.in 2025-10-10 00:00:41 +00:00
GDB Administrator
7222cd1062 Automatic date update in version.in 2025-10-09 00:02:55 +00:00
Andre Vieira
0b04018789 aarch64, gas: Relax Armv9.6-A mandatory feature set
Remove FPRCVT and SVE2p2 from the set of mandatory features for Armv9.6-A.

(cherry picked from commit 94861aa1c0)
2025-10-08 11:33:31 +01:00
GDB Administrator
b86ffebe5b Automatic date update in version.in 2025-10-08 00:04:45 +00:00
GDB Administrator
5123cb3843 Automatic date update in version.in 2025-10-07 00:04:21 +00:00
GDB Administrator
d4f6e0b481 Automatic date update in version.in 2025-10-06 00:02:35 +00:00
GDB Administrator
8cb2eaf4cd Automatic date update in version.in 2025-10-05 00:04:28 +00:00
GDB Administrator
fbabfb8adb Automatic date update in version.in 2025-10-04 00:04:39 +00:00
H.J. Lu
4df2be7591 i386: Add GLIBC_ABI_GNU_TLS version dependency
On Linux/i386, programs and shared libraries compiled with
-mtls-dialect=gnu may fail silently at run-time against glibc without
the GNU TLS run-time fix for:

https://sourceware.org/bugzilla/show_bug.cgi?id=32996

The glibc version tag, GLIBC_ABI_GNU_TLS, has been added to indicate
that glibc has the working GNU TLS run-time:

commit ed1b7a5a489ab555a27fad9c101ebe2e1c1ba881
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jul 28 12:16:11 2025 -0700

    i386: Add GLIBC_ABI_GNU_TLS version [BZ #33221]

Add the --gnu-tls-tag option to x86-64 ELF linker to add the
GLIBC_ABI_GNU_TLS version dependency in output programs and shared
libraries when linking against glibc if input relocatable object files
call ___tls_get_addr.  The output will fail to load and run at run-time
against glibc which doesn't define the GLIBC_ABI_GNU_TLS version.

Add the --enable-gnu-tls-tag configure option to enable --gnu-tls-tag
by default.  If unspecified, linker will add the GLIBC_ABI_GNU_TLS
version dependency if input call ___tls_get_addr and libc.so defines
the GLIBC_ABI_GNU2_TLS version.

bfd/

	PR ld/33287
	* elf-linker-x86.h (elf_linker_x86_params): Add
	gnu_tls_version_tag.
	* elf32-i386.c (elf_backend_add_glibc_version_dependency): Add
	GLIBC_ABI_GNU_TLS support.
	* elfxx-x86.c (_bfd_x86_elf_link_check_relocs): Set
	has_tls_get_addr_call to 1 if ___tls_get_addr is used.
	* elfxx-x86.h (elf_x86_link_hash_table): Add has_tls_get_addr_call.

ld/

	PR ld/33287
	* Mention --gnu-tls-tag, --no-gnu-tls-tag and --enable-gnu-tls-tag.
	* config.in: Regenerated.
	* configure: Likewise.
	* configure.ac: Add --enable-gnu-tls-tag.
	* ld.texi: Document --gnu-tls-tag and --enable-gnu-tls-tag.
	* ldlex.h (option_values): Add OPTION_GNU_TLS_VERSION_TAG and
	OPTION_NO_GNU_TLS_VERSION_TAG.
	* emultempl/elf-i386-glibc.em (elf_i386_glibc_before_parse):
	Initialize params.gnu_tls_version_tag.
	(PARSE_AND_LIST_LONGOPTS_386): New.
	(PARSE_AND_LIST_OPTIONS_386): Likewise.
	(PARSE_AND_LIST_ARGS_CASES_386): Likewise.
	(PARSE_AND_LIST_LONGOPTS): Append $PARSE_AND_LIST_LONGOPTS_386.
	(PARSE_AND_LIST_OPTIONS): Append $PARSE_AND_LIST_OPTIONS_386.
	(PARSE_AND_LIST_ARGS_CASES): Append
	$PARSE_AND_LIST_ARGS_CASES_386.
	* testsuite/ld-i386/gnu-tls-1.s: Likewise.
	* testsuite/ld-i386/gnu-tls-1a.rd: Likewise.
	* testsuite/ld-i386/gnu-tls-1b.rd: Likewise.
	* testsuite/ld-i386/i386.exp: Run PR ld/33287 tests.

(cherry picked from commit fbcdc06c23)

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-10-03 15:53:15 +01:00
H.J. Lu
71c1de4b0c x86-64: Add GLIBC_ABI_DT_X86_64_PLT version dependency
On Linux/x86-64, programs and shared libraries created with -z mark-plt
have the GLIBC_2.36 version tag dependency since -z mark-plt uses the
r_addend field of the R_X86_64_JUMP_SLOT relocation to store the offset
of the indirect branch instruction.  Glibc versions which don't have the
commit added to glibc 2.36:

commit f8587a61892cbafd98ce599131bf4f103466f084
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri May 20 19:21:48 2022 -0700

    x86-64: Ignore r_addend for R_X86_64_GLOB_DAT/R_X86_64_JUMP_SLOT

won't ignore the r_addend value in the R_X86_64_JUMP_SLOT relocation.  If
glibc versions defines GLIBC_ABI_DT_X86_64_PLT version tag with

commit 399384e0c8193e31aea014220ccfa24300ae5938
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Aug 14 07:03:20 2025 -0700

    x86-64: Add GLIBC_ABI_DT_X86_64_PLT [BZ #33212]

to indicate inclusion of the commit:

commit f8587a61892cbafd98ce599131bf4f103466f084
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri May 20 19:21:48 2022 -0700

    x86-64: Ignore r_addend for R_X86_64_GLOB_DAT/R_X86_64_JUMP_SLOT

we can add GLIBC_ABI_DT_X86_64_PLT version tag dependency, instead of
GLIBC_2.36 version tag dependency.

	PR ld/33213
	* elf-bfd.h (_bfd_elf_link_add_glibc_version_dependency): Change
	return type to bool.
	* elf64-x86-64.c (elf_x86_64_add_glibc_version_dependency): Add
	GLIBC_ABI_DT_X86_64_PLT version tag dependency, instead of,
	GLIBC_2.36 version tag dependency, for -z mark-plt if libc.so
	defines GLIBC_ABI_DT_X86_64_PLT version tag.
	* elflink.c (_bfd_elf_link_add_glibc_version_dependency): Change
	return type to bool.  Return false if elf_link_add_glibc_verneed
	returns false.

(cherry picked from commit 66e4999f34)

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-10-03 15:53:14 +01:00
H.J. Lu
b0fe5c2378 x86: Add GLIBC_ABI_GNU2_TLS version dependency
On Linux/x86, programs and shared libraries compiled with
-mtls-dialect=gnu2 may fail silently at run-time against glibc without
the GNU2 TLS run-time fixes for:

https://sourceware.org/bugzilla/show_bug.cgi?id=31501
https://sourceware.org/bugzilla/show_bug.cgi?id=31372

A version tag, GLIBC_ABI_GNU2_TLS, has been added to glibc to indicate
that glibc has the working GNU2 TLS run-time.  Add the --gnu2-tls-tag
option to i386/x86-64 ELF linker to add the GLIBC_ABI_GNU2_TLS version
dependency in output programs and shared libraries when linking against
glibc if input relocatable object files have R_386_TLS_DESC_CALL or
R_X86_64_TLSDESC_CALL relocation.  The output will fail to load and run
at run-time against glibc which doesn't define the GLIBC_ABI_GNU2_TLS
version.

Add the --enable-gnu2-tls-tag configure option to enable --gnu2-tls-tag
by default.  If unspecified, linker will add the GLIBC_ABI_GNU2_TLS
version dependency if input object files have R_386_TLS_DESC_CALL or
R_X86_64_TLSDESC_CALL relocation and libc.so defines the GLIBC_ABI_GNU2_TLS
version.

Update elf_link_add_glibc_verneed to properly add the GLIBC_2.36 version
dependency when -z mark-plt -z nopack-relative-relocs passed to x86-64
ELF linker.

bfd/

	PR ld/33130
	* elf-bfd.h (_bfd_elf_link_add_glibc_version_dependency): Add
	a pointer to bool argument.
	* elf-linker-x86.h (elf_linker_x86_params): Add
	gnu2_tls_version_tag.
	* elf32-i386.c (elf_i386_scan_relocs): Set has_tls_desc_call to
	1 for R_386_TLS_DESC_CALL.
	(elf_i386_add_glibc_version_dependency): New.  Undef before
	FreeBSD support.
	* elf64-x86-64.c (elf_x86_64_scan_relocs): Set has_tls_desc_call
	to 1 for R_X86_64_TLSDESC_CALL.
	(elf_x86_64_add_glibc_version_dependency): Add GLIBC_ABI_GNU2_TLS
	version dependency if GLIBC_ABI_GNU2_TLS dependency isn't disabled
	and has_tlsdesc_call isn't 0.
	(elf_backend_add_glibc_version_dependency): Undef before CloudABI
	support and redefine for elf32-x86-64.
	* elflink.c (elf_link_add_glibc_verneed): Changed to return bool.
	Remove the pointer to elf_find_verdep_info argument.  Add a
	pointer to bool argument, auto_version. Return true if linked
	against glibc.  Otherwise return false.  If the version dependency
	is added, set *auto_version to true.  If *auto_version is true,
	add the version dependency only if libc.so defines the version.
	(_bfd_elf_link_add_glibc_version_dependency): Add a pointer to
	bool argument and pass it to elf_link_add_glibc_verneed.
	(_bfd_elf_link_add_dt_relr_dependency): Pass NULL to
	_bfd_elf_link_add_glibc_version_dependency.
	* elfxx-x86.h (elf_x86_link_hash_table): Add has_tls_desc_call.

ld/

	PR ld/33130
	* NEWS: Mention --gnu2-tls-tag, --no-gnu2-tls-tag and
	--enable-gnu2-tls-tag.
	* config.in: Regenerated.
	* configure: Likewise.
	* configure.ac: Add --enable-gnu2-tls-tag.
	* ld.texi: Document --gnu2-tls-tag/--no-gnu2-tls-tag.
	* ldlex.h (option_values): Add OPTION_GNU2_TLS_VERSION_TAG and
	OPTION_NO_GNU2_TLS_VERSION_TAG.
	* emulparams/elf32_x86_64.sh (EXTRA_EM_FILE): Changed to
	"elf-x86-64-glibc".
	* emulparams/elf_i386.sh (EXTRA_EM_FILE): Set to "elf-i386-glibc".
	* emulparams/elf_i386_fbsd.sh (EXTRA_EM_FILE): New.  Set to
	"elf-x86".
        * emulparams/elf_i386_haiku.sh (EXTRA_EM_FILE): Likewise.
	* emulparams/elf_x86_64.sh (EXTRA_EM_FILE): Likewise.
	* emulparams/elf_x86_64_cloudabi.sh (EXTRA_EM_FILE): New.  Set to
	"elf-x86-64".
	* emulparams/elf_x86_64_fbsd.sh (EXTRA_EM_FILE): New.  Set to
	"elf-x86-64".
	* emulparams/elf_x86_64_haiku.sh (EXTRA_EM_FILE): Likewise.
	* (EXTRA_EM_FILE): Likewise.
	* (EXTRA_EM_FILE): Likewise.
        * emultempl/elf-i386-glibc.em: New file.
	* emultempl/elf-x86-64-glibc.em: Likewise.
	* emultempl/elf-x86-64.em: Likewise.
	* emultempl/elf-x86-glibc.em: Likewise.
	* emultempl/elf-x86.em (elf_x86_64_before_parse): Removed.
	(LDEMUL_BEFORE_PARSE): Likewise.
	(elf_x86_64_before_allocation): Likewise.
	(LDEMUL_BEFORE_ALLOCATION): Likewise.
	* emultempl/solaris2-x86-64.em: New file.
	* testsuite/ld-i386/gnu2-tls-1.s: Likewise.
	* testsuite/ld-i386/gnu2-tls-1a.rd: Likewise.
	* testsuite/ld-i386/gnu2-tls-1b.rd: Likewise.
	* testsuite/ld-x86-64/gnu2-tls-1.s: Likewise.
	* testsuite/ld-x86-64/gnu2-tls-1a.rd: Likewise.
	* testsuite/ld-x86-64/gnu2-tls-1b.rd: Likewise.
	* testsuite/ld-x86-64/mark-plt-2.rd: Likewise.
	* testsuite/ld-x86-64/mark-plt-2.s: Likewise.
	* testsuite/ld-i386/i386.exp: Run GLIBC_ABI_GNU2_TLS tests.
	* testsuite/ld-x86-64/x86-64.exp: Likewise.

(cherry picked from commit 0d1e88f8bf)

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2025-10-03 15:53:14 +01:00
GDB Administrator
52da327213 Automatic date update in version.in 2025-10-03 00:04:17 +00:00
GDB Administrator
1e8c7e82b4 Automatic date update in version.in 2025-10-02 00:02:56 +00:00
GDB Administrator
10ddc3f26a Automatic date update in version.in 2025-10-01 00:04:24 +00:00
GDB Administrator
5eaebf5a1c Automatic date update in version.in 2025-09-30 00:03:56 +00:00
GDB Administrator
0f901f3d15 Automatic date update in version.in 2025-09-29 00:04:49 +00:00
GDB Administrator
c56ab12979 Automatic date update in version.in 2025-09-28 00:04:28 +00:00
GDB Administrator
3e82c320fe Automatic date update in version.in 2025-09-27 00:03:21 +00:00
GDB Administrator
cb5bbcff5a Automatic date update in version.in 2025-09-26 00:06:32 +00:00
GDB Administrator
f6b9d3f375 Automatic date update in version.in 2025-09-25 00:03:03 +00:00
GDB Administrator
0fe98aa2e7 Automatic date update in version.in 2025-09-24 00:04:34 +00:00
GDB Administrator
a33c36e38e Automatic date update in version.in 2025-09-23 00:05:11 +00:00
GDB Administrator
9a1950eb9a Automatic date update in version.in 2025-09-22 00:01:44 +00:00
GDB Administrator
2ea4007bf6 Automatic date update in version.in 2025-09-21 00:03:12 +00:00
GDB Administrator
6634d9a14f Automatic date update in version.in 2025-09-20 00:06:52 +00:00
GDB Administrator
363de62fb6 Automatic date update in version.in 2025-09-19 00:03:36 +00:00
GDB Administrator
2511935c63 Automatic date update in version.in 2025-09-18 00:07:59 +00:00
GDB Administrator
1b513f6c9c Automatic date update in version.in 2025-09-17 00:05:57 +00:00
GDB Administrator
e938718998 Automatic date update in version.in 2025-09-16 00:05:27 +00:00
GDB Administrator
58d3be7f99 Automatic date update in version.in 2025-09-15 00:02:41 +00:00
H.J. Lu
d5945a221f x86: Copy non_got_ref_without_indirect_extern_access
Copy non_got_ref_without_indirect_extern_access when copying indirect
symbol for weak alias so that _bfd_x86_elf_adjust_dynamic_symbol will
properly handle GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS.

bfd/

	PR ld/33409
	* elfxx-x86.c (_bfd_x86_elf_copy_indirect_symbol): Copy
	non_got_ref_without_indirect_extern_access.

ld/

	PR ld/33409
	* testsuite/config/default.exp (DIRECT_EXTERN_ACCESS_CFLAGS): New.
	(NO_DIRECT_EXTERN_ACCESS_CFLAGS): Likewise.
	* testsuite/ld-elf/shared.exp: Run PR ld/33409 tests.
	* testsuite/ld-elf/pr33409a.c: New file.
	* testsuite/ld-elf/pr33409b.c: Likewise.
	* testsuite/ld-elf/pr33409c.c: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 59ada1f6d6)
2025-09-14 06:06:51 -07:00
GDB Administrator
78125579d4 Automatic date update in version.in 2025-09-14 00:07:31 +00:00
GDB Administrator
e907c1e331 Automatic date update in version.in 2025-09-13 00:04:21 +00:00
GDB Administrator
3c3422e935 Automatic date update in version.in 2025-09-12 00:03:28 +00:00
GDB Administrator
995f9dfdde Automatic date update in version.in 2025-09-11 00:05:53 +00:00
GDB Administrator
fef4f7ecd7 Automatic date update in version.in 2025-09-10 00:04:29 +00:00