]> git.ipfire.org Git - thirdparty/glibc.git/commit
elf: Support DT_RELR relative relocation format
authorFangrui Song <maskray@google.com>
Mon, 25 Apr 2022 23:50:00 +0000 (16:50 -0700)
committerFangrui Song <maskray@google.com>
Mon, 25 Apr 2022 23:50:00 +0000 (16:50 -0700)
commitda683b1f1037bf63b0c42f79a8a46f58670b2fed
tree9089d992c32c7b6d3a462cd32d76a02a8b41e8af
parentd3c732cb4383d02e5d3099d87766e5853acf9ff8
elf: Support DT_RELR relative relocation format

Adapted from
https://sourceware.org/pipermail/libc-alpha/2022-April/138085.html
([PATCH v11 0/7] Support DT_RELR relative relocation format),
which is expected to be included in glibc 2.36.

glibc 2.35 has a fair amount of rtld changes to avoid nested functions
(https://sourceware.org/PR27220). This patch is carefully crafted to
make the minimal changes.

Notebly, this commit

* works around b/208156916 by not bumping DT_NUM. DT_RELR and DT_RELRSZ
  take the l_info slots at DT_VERSYM+1 and DT_VERSYM+2.
* avoids changes to include/link.h
* removes the time travel compatibility check (error if DT_RELR is used
  without GLIBC_ABI_DT_RELR version need). This needs link.h change and
  the detected case cannot happen if we correctly use
  -Wl,-z,pack-relative-relocs.
19 files changed:
configure
configure.ac
elf/Makefile
elf/Versions
elf/dynamic-link.h
elf/elf.h
elf/get-dynamic-info.h
elf/tst-relr-mod2.c [new file with mode: 0644]
elf/tst-relr-mod3a.c [new file with mode: 0644]
elf/tst-relr-mod3b.c [new file with mode: 0644]
elf/tst-relr-mod4a.c [new file with mode: 0644]
elf/tst-relr-mod4b.c [new file with mode: 0644]
elf/tst-relr-mod4b.map [new file with mode: 0644]
elf/tst-relr-pie.c [new file with mode: 0644]
elf/tst-relr.c [new file with mode: 0644]
elf/tst-relr2.c [new file with mode: 0644]
elf/tst-relr3.c [new file with mode: 0644]
elf/tst-relr4.c [new file with mode: 0644]
scripts/versions.awk