DT_RELR design

Alan Modra amodra@gmail.com
Thu Jan 6 23:11:47 GMT 2022


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.

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list