Commit Graph

112903 Commits

Author SHA1 Message Date
Lulu Cai
060bfd9081 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 5966e2eb3f)
2024-11-11 11:46:20 +08:00
Jinyang He
c3817e092d LoongArch: Enable gas sort relocs
The md_pre_output_hook creating fixup is asynchronous, causing relocs
may be out of order in .eh_frame. Define GAS_SORT_RELOCS so that reorder
relocs when write_relocs.

Reported-by: Rui Ueyama <rui314@gmail.com>
(cherry picked from commit 7c93730fe5)
2024-11-11 11:44:24 +08:00
Nick Alcock
e05406c548
libctf: fix ref leak of names of newly-inserted non-root-visible types
A bug in ctf_dtd_delete led to refs in the string table to the
names of non-root-visible types not being removed when the DTD
was.  This seems harmless, but actually it would lead to a write
down a pointer into freed memory if such a type was ctf_rollback()ed
over and then the dict was serialized (updating all the refs as the
strtab was serialized in turn).

Bug introduced in commit fe4c2d5563
("libctf: create: non-root-visible types should not appear in name tables")
which is included in binutils 2.35.

libctf/
	* ctf-create.c (ctf_dtd_delete): Remove refs for all types
	with names, not just root-visible ones.
2024-08-01 20:09:15 +01:00
Alan Modra
391fd4d9ee PR30697, ppc32 mix of local-dynamic and global-dynamic TLS
This fixes miscounting of dynamic relocations on GOT entries when
a) there are both local-dynamic and global-dynamic tls accesss for a
   given symbol, and
b) the symbol is global with non-default visibility, and
c) the __tls_get_addr calls aren't optimised away.

	PR 30697
bfd/
	* elf32-ppc.c (allocate_dynrelocs): Correct local-dynamic
	reloc count.
ld/
	* testsuite/ld-powerpc/tls32ldgd.d,
	* testsuite/ld-powerpc/tls32ldgd.s: New test.
	* testsuite/ld-powerpc/powerpc.exp: Run it.

(cherry picked from commit ae33771224)
2023-08-04 18:03:16 +09:30
GDB Administrator
99d0971e80 Automatic date update in version.in 2023-07-03 00:00:45 +00:00
GDB Administrator
af76e9d4f8 Automatic date update in version.in 2023-07-02 00:00:38 +00:00
GDB Administrator
46bcfa66c2 Automatic date update in version.in 2023-07-01 00:00:53 +00:00
GDB Administrator
0851a80199 Automatic date update in version.in 2023-06-30 00:00:38 +00:00
GDB Administrator
9ddbf92e85 Automatic date update in version.in 2023-06-29 00:00:59 +00:00
GDB Administrator
a12eb3d7b4 Automatic date update in version.in 2023-06-28 00:01:38 +00:00
GDB Administrator
28cb7cd230 Automatic date update in version.in 2023-06-27 00:00:57 +00:00
GDB Administrator
4bee24b875 Automatic date update in version.in 2023-06-26 00:00:36 +00:00
GDB Administrator
a5ebbadee5 Automatic date update in version.in 2023-06-25 00:00:46 +00:00
GDB Administrator
6fc8d65960 Automatic date update in version.in 2023-06-24 00:00:51 +00:00
Alan Modra
7ad52a2357 [GOLD] powerpc DT_RELACOUNT
DT_RELACOUNT was calculated incorrectly, and relative relocs not
sorted as they should be to the start of .rela.dyn, due to adding one
particular class of dynamic reloc using the wrong "add" method.

	* powerpc.cc (Target_powerpc::Scan::global): Add relative
	dyn relocs for ADDR64 and similar using add_global_relative.

(cherry picked from commit 027614abf1)
2023-06-23 21:06:41 +09:30
GDB Administrator
9f6be18644 Automatic date update in version.in 2023-06-23 00:01:03 +00:00
GDB Administrator
8d66e5b4da Automatic date update in version.in 2023-06-22 00:00:49 +00:00
Alan Modra
03f49a0619 PR30536, ppc64el gold linker produces unusable clang-16 binary
In commit 0961e63157, the fix for PR30217, make_lplt_section and
make_brlt_section were changed to use rela_dyn_ rather than their own
separate dynamic reloc sections.  This fails miserably whenever brlt_
is needed for long branches, due to needing to iterate sizing and thus
reset brlt_ sizes.

	PR 30536
	PR 30217
	* powerpc.cc (Target_powerpc::make_brlt_section): Don't use
	rela_dyn_.

(cherry picked from commit dc808a2eba)
2023-06-21 23:04:24 +09:30
GDB Administrator
756b006e0d Automatic date update in version.in 2023-06-21 00:01:08 +00:00
GDB Administrator
7343182dd1 Automatic date update in version.in 2023-06-20 00:01:13 +00:00
GDB Administrator
64109d0722 Automatic date update in version.in 2023-06-19 00:00:50 +00:00
GDB Administrator
e3137d8b48 Automatic date update in version.in 2023-06-18 00:00:51 +00:00
GDB Administrator
088cdeb3bf Automatic date update in version.in 2023-06-17 00:01:03 +00:00
GDB Administrator
6861a944ff Automatic date update in version.in 2023-06-16 00:00:55 +00:00
GDB Administrator
b1d3a16db2 Automatic date update in version.in 2023-06-15 00:00:57 +00:00
GDB Administrator
f70c73d7c6 Automatic date update in version.in 2023-06-14 00:00:58 +00:00
GDB Administrator
a1e3b93b28 Automatic date update in version.in 2023-06-13 00:00:48 +00:00
GDB Administrator
de9d14c5c8 Automatic date update in version.in 2023-06-12 00:00:42 +00:00
GDB Administrator
9b7f7ac9ee Automatic date update in version.in 2023-06-11 00:01:15 +00:00
GDB Administrator
802c6a3a92 Automatic date update in version.in 2023-06-10 00:00:46 +00:00
GDB Administrator
1720c590f3 Automatic date update in version.in 2023-06-09 00:01:52 +00:00
GDB Administrator
76e5677e1e Automatic date update in version.in 2023-06-08 00:01:36 +00:00
GDB Administrator
5c69952478 Automatic date update in version.in 2023-06-07 00:02:02 +00:00
GDB Administrator
842eca3738 Automatic date update in version.in 2023-06-06 00:02:43 +00:00
GDB Administrator
b765cd80a5 Automatic date update in version.in 2023-06-05 00:01:09 +00:00
GDB Administrator
16f5a87c62 Automatic date update in version.in 2023-06-04 00:01:36 +00:00
GDB Administrator
390da71a78 Automatic date update in version.in 2023-06-03 00:01:30 +00:00
GDB Administrator
6a5f3aa611 Automatic date update in version.in 2023-06-02 00:02:12 +00:00
GDB Administrator
d6e6b7f584 Automatic date update in version.in 2023-06-01 00:01:13 +00:00
GDB Administrator
e176f03cb3 Automatic date update in version.in 2023-05-31 00:01:52 +00:00
GDB Administrator
7dc06170bf Automatic date update in version.in 2023-05-30 00:01:41 +00:00
GDB Administrator
7e7fb1275c Automatic date update in version.in 2023-05-29 00:01:57 +00:00
GDB Administrator
13327f3aec Automatic date update in version.in 2023-05-28 00:01:11 +00:00
GDB Administrator
2fb27bfa2b Automatic date update in version.in 2023-05-27 00:01:24 +00:00
GDB Administrator
1a0fd2b73c Automatic date update in version.in 2023-05-26 00:01:38 +00:00
GDB Administrator
ad96afffb8 Automatic date update in version.in 2023-05-25 00:01:18 +00:00
GDB Administrator
e4123826be Automatic date update in version.in 2023-05-24 00:01:15 +00:00
Nick Clifton
0dc8f96598 Updated Swedish translation for the opcodes directory 2023-05-23 13:52:23 +01:00
GDB Administrator
74117e6816 Automatic date update in version.in 2023-05-23 00:02:22 +00:00
GDB Administrator
8216b5dcd3 Automatic date update in version.in 2023-05-22 00:01:02 +00:00