Bug 28601 - gold: Support DT_RELR relative relocation format
Summary: gold: Support DT_RELR relative relocation format
Status: UNCONFIRMED
Alias: None
Product: binutils
Classification: Unclassified
Component: gold (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Cary Coutant
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-17 23:03 UTC by Fangrui Song
Modified: 2021-11-17 23:35 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fangrui Song 2021-11-17 23:03:48 UTC
gold version of https://sourceware.org/bugzilla/show_bug.cgi?id=27923 (GNU ld support).

I have a patch which will be posted soon.

The patch implements ld.lld flavored --pack-dyn-relocs=relr.
It doesn't do any "time travel compatibility" (https://maskray.me/blog/2021-10-31-relative-relocations-and-relr#time-travel-compatibility).
Such mechanism is unnecessary for many groups because they do not want to bump EI_ABIVERSION or synthesize a glibc flavored versioned symbol.

If glibc (actually some distro, not even necessarily the majority) is really fond of "time-travel-compatibility", perhaps we can add something like --pack-dyn-relocs=relr-glibc, but I'd be very sad to see a dedicated option variant is added (for the first time) for one particular libc implementation.
Comment 1 Fangrui Song 2021-11-17 23:35:46 UTC
Patch: https://sourceware.org/pipermail/binutils/2021-November/118567.html ("[PATCH] gold: Add --pack-dyn-relocs=relr for arm/aarch64/x86-64 [PR 28601]")