glibc/scripts
H.J. Lu 848746e88e elf: Add ELF_DYNAMIC_AFTER_RELOC to rewrite PLT
Add ELF_DYNAMIC_AFTER_RELOC to allow target specific processing after
relocation.

For x86-64, add

 #define DT_X86_64_PLT     (DT_LOPROC + 0)
 #define DT_X86_64_PLTSZ   (DT_LOPROC + 1)
 #define DT_X86_64_PLTENT  (DT_LOPROC + 3)

1. DT_X86_64_PLT: The address of the procedure linkage table.
2. DT_X86_64_PLTSZ: The total size, in bytes, of the procedure linkage
table.
3. DT_X86_64_PLTENT: The size, in bytes, of a procedure linkage table
entry.

With the r_addend field of the R_X86_64_JUMP_SLOT relocation set to the
memory offset of the indirect branch instruction.

Define ELF_DYNAMIC_AFTER_RELOC for x86-64 to rewrite the PLT section
with direct branch after relocation when the lazy binding is disabled.

PLT rewrite is disabled by default since SELinux may disallow modifying
code pages and ld.so can't detect it in all cases.  Use

$ export GLIBC_TUNABLES=glibc.cpu.plt_rewrite=1

to enable PLT rewrite with 32-bit direct jump at run-time or

$ export GLIBC_TUNABLES=glibc.cpu.plt_rewrite=2

to enable PLT rewrite with 32-bit direct jump and on APX processors with
64-bit absolute jump at run-time.

Reviewed-by: Noah Goldstein <goldstein.w.n@gmail.com>
2024-01-05 05:49:49 -08:00
..
abi-versions.awk
abilist.awk Add GLIBC_ABI_DT_RELR for DT_RELR support 2022-04-26 10:16:11 -07:00
backport-support.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
build-many-glibcs.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
check-c++-types.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
check-execstack.awk check-execstack: Permit sysdeps to xfail some libs 2018-07-20 03:28:14 +02:00
check-initfini.awk Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
check-installed-headers.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
check-local-headers.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
check-localplt.awk
check-obsolete-constructs.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
check-textrel.awk
check-wrapper-headers.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
check-wx-segment.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
config-uname.sh
config.guess Update scripts/config.* files from upstream GNU config version 2022-07-19 09:32:19 -03:00
config.sub Update scripts/config.* files from upstream GNU config version 2022-07-19 09:32:19 -03:00
cpp
cross-test-ssh.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
documented.sh crypt: Remove libcrypt support 2023-10-30 13:03:59 -03:00
dso-ordering-test.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
evaluate-test.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
firstversions.awk
gen-as-const.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gen-libc-abis
gen-libc-modules.awk
gen-posix-conf-vars.awk
gen-rrtypes.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gen-sorted.awk Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gen-tunables.awk elf: Add a way to check if tunable is set (BZ 27069) 2023-11-29 09:30:00 -03:00
glibc_shared_code.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
glibcelf.py elf: Add ELF_DYNAMIC_AFTER_RELOC to rewrite PLT 2024-01-05 05:49:49 -08:00
glibcextract.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
glibcpp.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
glibcsymbols.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
haveversions.awk Don't build libnsl for new ABIs 2018-09-24 10:23:10 +02:00
install-sh Update miscellaneous files from upstream sources. 2018-12-06 17:21:47 +00:00
lib-names.awk
lint-makefiles.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
list-fixed-bugs.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
list-sources.sh
localplt.awk scripts/localplt.awk: Handle DT_JMPREL with empty PLT (for C-SKY) 2022-10-27 11:36:44 +02:00
merge-test-results.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
mkinstalldirs Update miscellaneous files from upstream sources. 2018-12-06 17:21:47 +00:00
move-if-change Sync move-if-change from Gnulib, updating copyright 2022-01-01 11:42:26 -08:00
move-symbol-to-libc.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
process-fixed-cves.sh Move CVE information into advisories directory 2023-12-07 12:31:23 -05:00
pylint
pylintrc Fix all the remaining misspellings -- BZ 25337 2023-06-02 01:39:48 +00:00
rellns-sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
sort-makefile-lines.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
soversions.awk
sysd-rules.awk
test_printers_common.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test_printers_exceptions.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-installation.pl Update copyright dates not handled by scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-elf-edit.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-ld-trace.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
update-abilist.sh Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
update-copyrights Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
vcstocl_quirks.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
versionlist.awk Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
versions.awk Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00