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 Remove bitrotten --enable-oldest-abi (bug 6652). 2014-09-16 17:45:03 +00:00
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 Extend local PLT reference check 2015-07-29 11:58:06 -07:00
check-obsolete-constructs.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
check-textrel.awk Do check-textrel test using readelf rather than a build-time C program. 2012-05-01 13:27:11 -07:00
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 Rejigger header generation for default uname implementation. 2010-08-24 11:56:52 -07:00
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 Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
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 Fix bug in firstversions.awk version range handling. 2012-01-28 12:02:44 -05:00
gen-as-const.py Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gen-libc-abis Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
gen-libc-modules.awk Auto-generate libc-modules.h 2014-11-19 12:16:00 +05:30
gen-posix-conf-vars.awk Remove uses of sprintf in gen-posix-conf-vars.awk 2015-01-02 11:16:35 +05:30
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 Clean up gnu/lib-names.h generation (bug 14171). 2014-09-26 17:33:04 +00:00
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 Update scripts/list-sources.sh for ports repository merge. 2014-06-26 21:30:07 +00:00
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 Implement benchmarking script in python 2014-03-21 17:32:50 +05:30
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 Remove bitrotten --enable-oldest-abi (bug 6652). 2014-09-16 17:45:03 +00:00
sysd-rules.awk sysd-rules: Cut down the number of rtld-% pattern rules 2016-09-20 10:41:05 +02:00
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