public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug dynamic-link/27924] New: ld.so: Support DT_RELR relative relocation format
@ 2021-05-27 18:14 i at maskray dot me
  2021-05-27 18:40 ` [Bug dynamic-link/27924] " i at maskray dot me
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: i at maskray dot me @ 2021-05-27 18:14 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=27924

            Bug ID: 27924
           Summary: ld.so: Support DT_RELR relative relocation format
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: i at maskray dot me
  Target Milestone: ---

Position independent executables and shared objects built with
-Bsymbolic/-Bsymbolic-functions may have many relative relocations (instead of
absolute relocations (e.g. R_X86_64_64)).

(The number of R_*_RELATIVE is the dominating factor between a PDE and a PIE in
terms of their size differences.)

Relative relocations can be packed in a compact format to save a lot of space.
See the last few messages on
https://groups.google.com/g/generic-abi/c/bX460iggiKg

An Elf64_Rela takes 24 bytes. 64 consecutive R_*_RELATIVE take 24*64 bytes. In
RELR, this just needs 8*2 bytes.

DT_RELR has support in the Linux kernel (arch/arm64/Kconfig ARCH_HAS_RELR)
since 2019
https://git.kernel.org/linus/5cf896fb6be3effd9aea455b22213e27be8bdb1d

SHT_RELR/DT_RELR has dumper support in llvm-readobj/llvm-readelf. 
ld.lld --pack-dyn-relocs=relr can encode R_*_RELATIVE in RELR.

GNU ld feature request: https://sourceware.org/bugzilla/show_bug.cgi?id=27923

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2022-06-07  8:05 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27 18:14 [Bug dynamic-link/27924] New: ld.so: Support DT_RELR relative relocation format i at maskray dot me
2021-05-27 18:40 ` [Bug dynamic-link/27924] " i at maskray dot me
2021-05-27 19:01 ` i at maskray dot me
2021-05-27 23:20 ` i at maskray dot me
2021-06-24 16:08 ` carlos at redhat dot com
2021-06-24 16:08 ` carlos at redhat dot com
2021-06-24 16:30 ` carlos at redhat dot com
2021-06-24 18:03 ` i at maskray dot me
2021-06-24 18:15 ` carlos at redhat dot com
2021-06-24 21:38 ` ccoutant at gmail dot com
2021-06-24 21:38 ` ccoutant at gmail dot com
2021-10-08 21:52 ` i at maskray dot me
2021-10-15 22:00 ` sam at gentoo dot org
2021-10-19 13:11 ` carlos at redhat dot com
2021-10-19 16:51 ` i at maskray dot me
2021-10-25 13:47 ` fweimer at redhat dot com
2021-10-25 13:50 ` fweimer at redhat dot com
2022-01-05  0:25 ` hjl.tools at gmail dot com
2022-01-05  1:11 ` i at maskray dot me
2022-01-05  1:49 ` hjl.tools at gmail dot com
2022-01-05  1:50 ` hjl.tools at gmail dot com
2022-01-05  3:27 ` i at maskray dot me
2022-01-05  3:39 ` hjl.tools at gmail dot com
2022-01-05  3:42 ` hjl.tools at gmail dot com
2022-01-05 22:54 ` hjl.tools at gmail dot com
2022-01-08 20:36 ` hjl.tools at gmail dot com
2022-01-09 17:10 ` hjl.tools at gmail dot com
2022-06-07  8:05 ` i at maskray dot me

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).