diff options
| author | Alan Modra <amodra@gmail.com> | 2026-02-05 08:34:31 +1030 |
|---|---|---|
| committer | Alan Modra <amodra@gmail.com> | 2026-02-05 08:34:31 +1030 |
| commit | 2dfd38f93ce3b05d25c7bd14cbcff0fa3614c056 (patch) | |
| tree | 600dae40893c722312af4e5b19a0adb8cee076e9 /sim/testsuite/mips | |
| parent | 4e76b375191934ecf41d27b7d887ce0aa880440c (diff) | |
| download | fsf-binutils-gdb-master.zip fsf-binutils-gdb-master.tar.gz fsf-binutils-gdb-master.tar.bz2 | |
elfNN_aarch64_plt_sym_val wrongly treats PIEs. PIEs are an executable
but not ET_EXEC, instead being ET_DYN with DF_1_PIE set in DT_FLAGS_1
to distinguish them from shared libraries.
get_plt_type scans .dynamic for DT_AARCH64_BTI_PLT and
DT_AARCH64_PAC_PLT, setting PLT_BTI and PLT_PAC in the function return
value respectively. It's easy enough to extend the .dynamic scan to
also return DF_1_PIE in tdata is_pie.
The patch also makes a few tidies, things I noticed when scanning all
the code dealing with sw_protections.plt_type.
PR 33593
* elfnn-aarch64.c (get_plt_type): Return DF_1_PIE via tdata is_pie.
(elfNN_aarch64_plt_sym_val): Handle PIEs as well as ET_EXEC.
(setup_plt_values): Delete wrong ET_EXEC comments.
(elfNN_aarch64_late_size_sections): Remove excess parentheses.
(elfNN_aarch64_finish_dynamic_sections): Rename type to plt_type,
and simplify test for PLT_BTI or PLT_BTI_PAC.
Co-Authored-By: Michael Matz <matz@suse.de>
Diffstat (limited to 'sim/testsuite/mips')
0 files changed, 0 insertions, 0 deletions
