[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC
From: |
cvs-commit at gcc dot gnu.org |
Subject: |
[Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC |
Date: |
Thu, 30 Jul 2020 16:02:17 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26312
--- Comment #8 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot
gnu.org> ---
The master branch has been updated by Szabolcs Nagy <nsz@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4d3bb35620e70d543d438bf21be1307f7ea0f5d0
commit 4d3bb35620e70d543d438bf21be1307f7ea0f5d0
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Wed Jul 29 15:47:50 2020 +0100
aarch64: set sh_entsize of .plt to 0
On aarch64 the first PLT entry is 32 bytes, subsequent entries
are 16 bytes by default but can be 24 bytes with BTI or with
PAC-PLT.
sh_entsize of .plt was set to the PLT entry size, so in some
cases sh_size % sh_entsize != 0, which breaks some tools.
Note that PLT0 (and the TLSDESC stub code which is also in the
PLT) were historically not padded up to meet the sh_size
requirement, but to ensure that PLT stub code is aligned on
cache lines. Similar layout is present on other targets too
which just happens to make sh_size a multiple of sh_entsize and
it is not expected that sh_entsize of .plt is used for anything.
This patch sets sh_entsize of .plt to 0: the section does not
hold a table of fixed-size entries so other values are not
conforming in principle to the ELF spec.
bfd/ChangeLog:
PR ld/26312
* elfnn-aarch64.c (elfNN_aarch64_init_small_plt0_entry): Set
sh_entsize
to 0.
(elfNN_aarch64_finish_dynamic_sections): Remove sh_entsize setting.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/26312] New: ld produces broken PLT on aarch64 with BTI+PAC, fweimer at redhat dot com, 2020/07/29
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC, mark at klomp dot org, 2020/07/29
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC, pbrobinson at gmail dot com, 2020/07/29
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC, jakub at redhat dot com, 2020/07/29
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC, nsz at gcc dot gnu.org, 2020/07/29
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC, mark at klomp dot org, 2020/07/29
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC, jakub at redhat dot com, 2020/07/29
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC, fweimer at redhat dot com, 2020/07/29
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC, nsz at gcc dot gnu.org, 2020/07/30
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC, nsz at gcc dot gnu.org, 2020/07/30
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC,
cvs-commit at gcc dot gnu.org <=
- [Bug ld/26312] ld produces broken PLT on aarch64 with BTI+PAC, cvs-commit at gcc dot gnu.org, 2020/07/30