DT_RELR design
Fangrui Song
i@maskray.me
Fri Jan 7 02:01:30 GMT 2022
On 2022-01-07, Alan Modra via Binutils wrote:
>gcc -shared -fPIC on the following
>struct pack { char c; void *p; } __attribute__ ((__packed__));
>static char x;
>struct pack ref = { 'A', &x };
>
>results in
>0000000000004021 0000000000000008 R_X86_64_RELATIVE
>
>That odd address can't be encoded by the current DT_RELR design.
>That's likely to cause you some trouble on x86.
Odd addresses use R_*_RELATIVE.
Even addresses use .relr.dyn.
In my gold patch
https://sourceware.org/pipermail/binutils/2021-November/118567.html
gold/testsuite/relr_aarch64.sh actually tests this.
More information about the Binutils
mailing list