glibc/scripts
Florian Weimer 77db67c56b scripts/localplt.awk: Handle DT_JMPREL with empty PLT (for C-SKY)
On csky-linux-gnuabiv2, binutils 2.33 produces a DT_JMPREL entry
for the dynamic loader if it does not contain any PLT relocations:

Dynamic section at offset 0x1df48 contains 19 entries:
  Tag        Type                         Name/Value
 0x0000000e (SONAME)                     Library soname: [ld-linux-cskyv2-hf.so.1]
 0x00000004 (HASH)                       0xd4
 0x6ffffef5 (GNU_HASH)                   0x1a8
 0x00000005 (STRTAB)                     0x4ac
 0x00000006 (SYMTAB)                     0x28c
 0x0000000a (STRSZ)                      527 (bytes)
 0x0000000b (SYMENT)                     16 (bytes)
 0x00000003 (PLTGOT)                     0x1f000
 0x00000002 (PLTRELSZ)                   0 (bytes)
 0x00000014 (PLTREL)                     RELA
 0x00000017 (JMPREL)                     0xaa4
 0x00000007 (RELA)                       0x75c
 0x00000008 (RELASZ)                     840 (bytes)
 0x00000009 (RELAENT)                    12 (bytes)
 0x6ffffffc (VERDEF)                     0x700
 0x6ffffffd (VERDEFNUM)                  3
 0x6ffffff0 (VERSYM)                     0x6bc
 0x6ffffff9 (RELACOUNT)                  68
 0x00000000 (NULL)                       0x0

This confuses the script:

Unexpected output from check-localplt: …/elf/ld.so.jmprel:
*** DT_JMPREL does not match any section's address

This commit changes the script to record the DT_PLTRELSZ value and
reject DT_JMPREL values not a section boundary only if DT_PLTRELSZ
is present with a non-zero value.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2022-10-27 11:36:44 +02: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 2022-01-01 11:40:24 -08:00
build-many-glibcs.py Use Linux 6.0 in build-many-glibcs.py 2022-10-04 13:57:19 +00:00
check-c++-types.sh grep: egrep -> grep -E, fgrep -> grep -F 2022-06-05 12:09:02 -07:00
check-execstack.awk
check-initfini.awk Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
check-installed-headers.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
check-local-headers.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
check-localplt.awk
check-obsolete-constructs.py scripts: Extract glibcpp.py from check-obsolete-constructs.py 2022-09-22 12:10:41 +02:00
check-textrel.awk
check-wrapper-headers.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
check-wx-segment.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -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 2022-01-01 11:40:24 -08:00
documented.sh grep: egrep -> grep -E, fgrep -> grep -F 2022-06-05 12:09:02 -07:00
dso-ordering-test.py scripts/dso-ordering-test.py: Generate program run-time dependencies 2022-09-06 07:38:16 +02:00
evaluate-test.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
firstversions.awk
gen-as-const.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
gen-libc-abis
gen-libc-modules.awk
gen-posix-conf-vars.awk
gen-rrtypes.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
gen-sorted.awk Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
gen-tunables.awk
glibc_shared_code.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
glibcelf.py elf: Extract glibcelf constants from <elf.h> 2022-09-22 12:10:41 +02:00
glibcextract.py glibcextract.py: Add compile_c_snippet 2022-08-12 09:15:03 -03:00
glibcpp.py scripts: Enhance glibcpp to do basic macro processing 2022-09-22 12:10:41 +02:00
glibcsymbols.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
haveversions.awk
install-sh
lib-names.awk
list-fixed-bugs.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -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 2022-01-01 11:40:24 -08:00
mkinstalldirs
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 2022-01-01 11:40:24 -08:00
pylint
pylintrc
rellns-sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
soversions.awk
sysd-rules.awk
test_printers_common.py Disable debuginfod in printer tests [BZ #28757] 2022-01-14 05:07:29 -08:00
test_printers_exceptions.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
test-installation.pl Update copyright dates not handled by scripts/update-copyrights. 2022-01-01 11:42:26 -08:00
tst-elf-edit.py csu: Implement and use _dl_early_allocate during static startup 2022-05-16 18:42:03 +02:00
tst-ld-trace.py elf: Fix DFS sorting algorithm for LD_TRACE_LOADED_OBJECTS with missing libraries (BZ #28868) 2022-04-27 08:36:09 -03:00
update-abilist.sh Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
update-copyrights Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
vcstocl_quirks.py Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
versionlist.awk Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
versions.awk Add GLIBC_ABI_DT_RELR for DT_RELR support 2022-04-26 10:16:11 -07:00