19117 Commits

Author SHA1 Message Date
Alan Modra
758a2290db PR32387 ppc64 TLS optimization bug with -fno-plt code
The inline plt code emitted by gcc is incompatible with the
linker/ld.so --tls-get-addr-optimize scheme.  This is the runtime
optimisation where the first call to __tls_get_addr results in
__tls_get_addr updating the tls_index pair, then the special linker
stub using that to short-circuit second and subsequent calls for a
given tls symbol.  Enabled by default when the linker sees
__tls_get_addr_opt is preseent, and enabled in ld.so when DT_PPC64_OPT
has PPC64_OPT_TLS set.  Note that this is distinct from link-time tls
optimisation.

	PR 32387
	* elf64-ppc.c (ppc64_elf_check_relocs): Disable tls_get_addr_opt
	on detecting inline plt calls to __tls_get_addr.

(cherry picked from commit 1686dc7079f1c03bdaffd2f779b92aa2b7ad97b5)
2024-11-27 08:52:24 +10:30
Lulu Cai
09ba78f051 LoongArch: ld:Report an error when seeing an unrecognized relocation
If we generate an object file using an assembler with the new
relocations added, and then linking those files with an older
linker, the link will still complete and the linked file will
be generated.
In this case we should report an error instead of continuing
the linking process.

(cherry picked from commit 5966e2eb3fed61ebe5c091a074b368b9238a68c1)
2024-11-11 11:55:37 +08:00
Xin Wang
10a143e273 LoongArch: Add elfNN_loongarch_mkobject to initialize LoongArch tdata
LoongArch: Add elfNN_loongarch_mkobject to initialize LoongArch tdata.

(cherry picked from commit 28489a70d4660d67e71d75e82286a6e1a7003b93)
2024-10-24 10:47:05 +08:00
Lulu Cai
9055fbe5ff LoongArch: The symbol got type can only be obtained after initialization
When scanning relocations and determining whether TLS type transition is
possible, it will try to obtain the symbol got type. If the symbol got
type record has not yet been allocated space and initialized, it will
cause ld to crash. So when uninitialized, the symbol is set to GOT_UNKNOWN.

(cherry picked from commit b221bff7c7ca20d961a7e6b663a545384054a5be)
2024-10-24 10:06:20 +08:00
GDB Administrator
e7cd38b6cd Automatic date update in version.in 2024-07-23 00:01:19 +00:00
GDB Administrator
ee3902864d Automatic date update in version.in 2024-07-22 00:00:43 +00:00
GDB Administrator
595d15a876 Automatic date update in version.in 2024-07-21 00:01:22 +00:00
GDB Administrator
63240fa389 Automatic date update in version.in 2024-07-20 00:00:47 +00:00
GDB Administrator
7ed8c42121 Automatic date update in version.in 2024-07-19 00:01:18 +00:00
GDB Administrator
6a68cd2f30 Automatic date update in version.in 2024-07-18 00:01:32 +00:00
GDB Administrator
e343b51459 Automatic date update in version.in 2024-07-17 00:01:22 +00:00
GDB Administrator
71ef12cbf1 Automatic date update in version.in 2024-07-16 00:01:06 +00:00
GDB Administrator
8678e3decb Automatic date update in version.in 2024-07-15 00:00:50 +00:00
John David Anglin
92cc764e58 hppa: Fix handling of relocations that apply to data
Commit d125f9675372b1ae01ceb1893c06ccb27bc7bf22 introduced a bug
in handling relocations for data.  The R_PARISC_DIR32 relocation
operates on 32-bit data and not instructions.  The HOWTO table
needs to be used to determine the format of relocations that apply
to data.  The R_PARISC_SEGBASE relocation is another special case
as it only changes segment base.

This was noticed in Debian cmor package build.

2024-07-14  John David Anglin  <danglin@gcc.gnu.org>

bfd/ChangeLog:

	* elf32-hppa.c (final_link_relocate): Use HOWTO table to
	determine reload format for relocations that apply to data.
2024-07-14 07:25:17 -04:00
GDB Administrator
fbfdb7bbec Automatic date update in version.in 2024-07-14 00:01:01 +00:00
GDB Administrator
86c5bfcc72 Automatic date update in version.in 2024-07-13 00:01:22 +00:00
GDB Administrator
b2a84f1ea5 Automatic date update in version.in 2024-07-12 00:01:55 +00:00
GDB Administrator
31f696f33c Automatic date update in version.in 2024-07-11 00:00:42 +00:00
GDB Administrator
1bc11d6238 Automatic date update in version.in 2024-07-10 00:02:23 +00:00
H.J. Lu
c439c1e1f5 elf: Add glibc version dependency only if needed
There is no need to add a needed glibc version if the glibc base version
includes the needed glibc version.

	PR ld/31966
	* elflink.c (elf_link_add_glibc_verneed): Add glibc_minor_base.
	Skip if the glibc base version includes the needed glibc version.
	(_bfd_elf_link_add_glibc_version_dependency): Initialize
	glibc_minor_base to INT_MAX and pass it to
	elf_link_add_glibc_verneed.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
(cherry picked from commit 7757f66fdbe2a9fa4b51aa7792532fddda4b295c)
2024-07-09 14:38:15 -07:00
GDB Administrator
67cfd78a01 Automatic date update in version.in 2024-07-09 00:01:30 +00:00
GDB Administrator
5678bf2f89 Automatic date update in version.in 2024-07-08 00:00:45 +00:00
GDB Administrator
31be279bac Automatic date update in version.in 2024-07-07 00:00:36 +00:00
GDB Administrator
f9835bd581 Automatic date update in version.in 2024-07-06 00:00:46 +00:00
GDB Administrator
25f45815bb Automatic date update in version.in 2024-07-05 00:01:28 +00:00
GDB Administrator
a4dc8b3836 Automatic date update in version.in 2024-07-04 00:02:00 +00:00
GDB Administrator
e924470a4e Automatic date update in version.in 2024-07-03 00:01:57 +00:00
GDB Administrator
db0bd35f03 Automatic date update in version.in 2024-07-02 00:01:45 +00:00
GDB Administrator
7973187846 Automatic date update in version.in 2024-07-01 00:02:02 +00:00
GDB Administrator
92da6369e9 Automatic date update in version.in 2024-06-30 00:02:34 +00:00
GDB Administrator
1e285d4f04 Automatic date update in version.in 2024-06-29 00:02:50 +00:00
GDB Administrator
d7721907cf Automatic date update in version.in 2024-06-28 00:01:01 +00:00
GDB Administrator
2462485647 Automatic date update in version.in 2024-06-27 00:02:01 +00:00
GDB Administrator
a491e502e6 Automatic date update in version.in 2024-06-26 00:02:30 +00:00
GDB Administrator
c1efe2d814 Automatic date update in version.in 2024-06-25 00:01:31 +00:00
GDB Administrator
54b3291e97 Automatic date update in version.in 2024-06-24 00:01:17 +00:00
GDB Administrator
a53e4ed2ff Automatic date update in version.in 2024-06-23 00:01:51 +00:00
GDB Administrator
182c0bf01b Automatic date update in version.in 2024-06-22 00:01:33 +00:00
GDB Administrator
7622d46aa9 Automatic date update in version.in 2024-06-21 00:02:27 +00:00
GDB Administrator
cbec9028dd Automatic date update in version.in 2024-06-20 00:02:01 +00:00
GDB Administrator
94f830e736 Automatic date update in version.in 2024-06-19 00:01:23 +00:00
GDB Administrator
23fc7e724b Automatic date update in version.in 2024-06-18 00:01:16 +00:00
GDB Administrator
3e6f8ffd0f Automatic date update in version.in 2024-06-17 00:01:17 +00:00
GDB Administrator
0a7301d97b Automatic date update in version.in 2024-06-16 00:00:51 +00:00
GDB Administrator
bb541297a6 Automatic date update in version.in 2024-06-15 00:01:44 +00:00
GDB Administrator
e830307135 Automatic date update in version.in 2024-06-14 00:01:40 +00:00
GDB Administrator
03470d6459 Automatic date update in version.in 2024-06-13 00:02:10 +00:00
GDB Administrator
8d2a803ef8 Automatic date update in version.in 2024-06-12 00:01:54 +00:00
GDB Administrator
92ef735998 Automatic date update in version.in 2024-06-11 00:01:16 +00:00
GDB Administrator
39320073bd Automatic date update in version.in 2024-06-10 00:02:02 +00:00