[PATCH] ld: Add -z no-relax=SYMBOL
Jan Beulich
jbeulich@suse.com
Mon Jan 27 08:57:27 GMT 2025
On 27.01.2025 02:33, H.J. Lu wrote:
> Add a "-z no-relax=SYMBOL" option to x86-64 linker to disable linker
> optimization on GOTPCRELX relocations against SYMBOL.
If I'm not mistaken, this addresses only one of the two aspects mentioned
in the bug report: While it indeed makes -z no-relax more fine grained, it
at the same time still is all-or-nothing for a particular symbol. When, as
described there, the conversion to PC32 may be okay to make (as that's
merely dependent on executable size, not on its load address). Obviously
the situation can in principle also be the other way around: Conversion to
PC32 may not be possible, but conversion to 32/32S may be.
I continue to think along the lines of what Fangrui also said: We rather
need to be able to roll back (unless we can arrange for deferring the
decision until a point where we know whether the converted-to relocation
would overflow).
Jan
More information about the Binutils
mailing list