Commit Graph

107141 Commits

Author SHA1 Message Date
Nick Alcock
0daea2d62c
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-02 11:56:42 +01:00
Stefan Liebler
44f1cd7f53 s390: Add DT_JMPREL pointing to .rela.[i]plt with static-pie
In static-pie case, there are IRELATIVE-relocs in
.rela.iplt (htab->irelplt), which will later be grouped
to .rela.plt.  On s390, the IRELATIVE relocations are
always located in .rela.iplt - even for non-static case.
Ensure that DT_JMPREL, DT_PLTRELA, DT_PLTRELASZ is added
to the dynamic section even if htab->srelplt->size == 0.
See _bfd_elf_add_dynamic_tags in bfd/elflink.c.

bfd/
	elf64-s390.c (elf_s390_size_dynamic_sections):
	Enforce DT_JMPREL via htab->elf.dt_jmprel_required.

(cherry picked from commit d942d8db12)
2022-04-28 14:54:50 +02:00
Stefan Liebler
e20961e9f9 s390: Avoid dynamic TLS relocs in PIE
No dynamic relocs are needed for TLS defined in an executable, the
TP relative offset is known at link time.

Fixes
FAIL: Build pr22263-1

bfd/
	PR ld/22263
	* elf64-s390.c (elf_s390_tls_transition): Use bfd_link_dll
	instead of bfd_link_pic for TLS.
	(elf_s390_check_relocs): Likewise.
	(allocate_dynrelocs): Likewise.
	(elf_s390_relocate_section): Likewise.

(cherry picked from commit 26b1426577)
2022-04-28 14:54:50 +02:00
Andreas Krebbel
e24d2a2d11 IBM zSystems: Add support for z16 as CPU name.
So far z16 was identified as arch14. After the machine has been
announced we can now add the real name.

(cherry picked from commit 69341966de)
(cherry picked from commit fb4d148004)
2022-04-07 08:21:14 +02:00
Alan Modra
feee8c0848 PR28959, obdump doesn't disassemble mftb instruction
Without a -M cpu option given, powerpc objdump defaults currently to
-Mpower10 but -Many is also given.  Commit 1ff6a3b8e5 regressed
-Many disassembly of instructions that are encoded differently
depending on cpu, such as mftb which has pre- and post-power4
encodings.

	PR 28959
	* ppc-dis.c (lookup_powerpc): Revert 2021-05-28 change.  Instead
	only look at deprecated PPC_OPCODE_RAW bit when -Many.

(cherry picked from commit b508e46bf9)
2022-03-14 09:23:56 +10:30
H.J. Lu
7c4b20b958 i386: Allow GOT32 relocations against ABS symbols
GOT32 relocations are allowed since absolute value + addend is stored in
the GOT slot.

Tested on glibc 2.35 build with GCC 11.2 and -Os.

bfd/

	PR ld/28870
	* elfxx-x86.c (_bfd_elf_x86_valid_reloc_p): Also allow GOT32
	relocations.

ld/

	PR ld/28870
	* testsuite/ld-i386/i386.exp: Run pr28870.
	* testsuite/ld-i386/pr28870.d: New file.
	* testsuite/ld-i386/pr28870.s: Likewise.

(cherry picked from commit 30a954525f)
2022-02-07 16:13:51 -08:00
GDB Administrator
5f62caec81 Automatic date update in version.in 2022-01-22 00:00:50 +00:00
GDB Administrator
544818c087 Automatic date update in version.in 2022-01-21 00:00:42 +00:00
GDB Administrator
589b6fc198 Automatic date update in version.in 2022-01-20 00:00:54 +00:00
GDB Administrator
3f4442ae83 Automatic date update in version.in 2022-01-19 00:00:55 +00:00
GDB Administrator
cf0ac00a84 Automatic date update in version.in 2022-01-18 00:00:43 +00:00
GDB Administrator
182284deb1 Automatic date update in version.in 2022-01-17 00:00:57 +00:00
GDB Administrator
f60dbe8d12 Automatic date update in version.in 2022-01-16 00:00:43 +00:00
GDB Administrator
1f5be5f22a Automatic date update in version.in 2022-01-15 00:00:41 +00:00
GDB Administrator
6e072dd0f1 Automatic date update in version.in 2022-01-14 00:01:08 +00:00
GDB Administrator
eb31394c23 Automatic date update in version.in 2022-01-13 00:00:55 +00:00
GDB Administrator
ebadd3ef87 Automatic date update in version.in 2022-01-12 00:00:50 +00:00
GDB Administrator
d114d4e9bc Automatic date update in version.in 2022-01-11 00:01:04 +00:00
GDB Administrator
22f9d25c97 Automatic date update in version.in 2022-01-10 00:00:52 +00:00
GDB Administrator
988b35012b Automatic date update in version.in 2022-01-09 00:00:49 +00:00
GDB Administrator
119e9b2458 Automatic date update in version.in 2022-01-08 00:00:41 +00:00
GDB Administrator
2eb6f36dc7 Automatic date update in version.in 2022-01-07 00:00:49 +00:00
GDB Administrator
6b6f129692 Automatic date update in version.in 2022-01-06 00:00:58 +00:00
GDB Administrator
9bc6649d7b Automatic date update in version.in 2022-01-05 00:00:50 +00:00
GDB Administrator
c198c877ab Automatic date update in version.in 2022-01-04 00:00:49 +00:00
GDB Administrator
1e85b8e9ec Automatic date update in version.in 2022-01-03 00:00:59 +00:00
GDB Administrator
e140b569e5 Automatic date update in version.in 2022-01-02 00:00:50 +00:00
GDB Administrator
0080033e29 Automatic date update in version.in 2022-01-01 00:00:48 +00:00
Alan Modra
c912b88e00 -Waddress warning in ldelf.c
ldelf.c: In function 'ldelf_after_open':
ldelf.c:1049:43: warning: the comparison will always evaluate as 'true' for the address of 'elf_header' will never be NULL [-Waddress]
 1049 |           && elf_tdata (abfd)->elf_header != NULL
      |                                           ^~
In file included from ldelf.c:37:
../bfd/elf-bfd.h:1957:21: note: 'elf_header' declared here
 1957 |   Elf_Internal_Ehdr elf_header[1];      /* Actual data, but ref like ptr */

	PR ld/28734
	* ldelf.c (ldelf_after_open): Remove useless elf_header test.

(cherry picked from commit ced10cb78d)
2021-12-31 07:54:26 -08:00
GDB Administrator
9113d6cff8 Automatic date update in version.in 2021-12-31 00:00:45 +00:00
GDB Administrator
d731b570f9 Automatic date update in version.in 2021-12-30 00:00:56 +00:00
GDB Administrator
bc6cd9525b Automatic date update in version.in 2021-12-29 00:00:48 +00:00
GDB Administrator
0c5af9fb8f Automatic date update in version.in 2021-12-28 00:00:33 +00:00
GDB Administrator
94b8bc9867 Automatic date update in version.in 2021-12-27 00:00:36 +00:00
GDB Administrator
e934dfff83 Automatic date update in version.in 2021-12-26 00:00:40 +00:00
GDB Administrator
541b1e2997 Automatic date update in version.in 2021-12-25 00:00:37 +00:00
GDB Administrator
be39f5ba30 Automatic date update in version.in 2021-12-24 00:00:38 +00:00
GDB Administrator
9137c2cb7c Automatic date update in version.in 2021-12-23 00:00:59 +00:00
GDB Administrator
862d4c203e Automatic date update in version.in 2021-12-22 00:00:45 +00:00
GDB Administrator
6e67642edc Automatic date update in version.in 2021-12-21 00:00:46 +00:00
GDB Administrator
72a45cec0f Automatic date update in version.in 2021-12-20 00:00:34 +00:00
GDB Administrator
446864d6d6 Automatic date update in version.in 2021-12-19 00:00:49 +00:00
GDB Administrator
25a297446c Automatic date update in version.in 2021-12-18 00:00:34 +00:00
GDB Administrator
a2fbc5eec7 Automatic date update in version.in 2021-12-17 00:00:45 +00:00
GDB Administrator
0a18ced151 Automatic date update in version.in 2021-12-16 00:00:37 +00:00
GDB Administrator
b77f1b197a Automatic date update in version.in 2021-12-15 00:00:50 +00:00
GDB Administrator
1fb4a5909e Automatic date update in version.in 2021-12-14 00:00:34 +00:00
GDB Administrator
172e0da3ef Automatic date update in version.in 2021-12-13 00:00:33 +00:00
GDB Administrator
d012e2bb91 Automatic date update in version.in 2021-12-12 00:00:28 +00:00
GDB Administrator
91cf5b0141 Automatic date update in version.in 2021-12-11 00:00:28 +00:00