https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122538

--- Comment #2 from Koakuma <koachan+gccbugs at protonmail dot com> ---
(In reply to Eric Botcazou from comment #1)
> The name of the register does not matter, only its value; in other words,
> the code is correct if %g1 contains the value computed in %g2 earlier.
> 
> R_SPARC_GOTDATA_OP simply says "change ldx to add" if the symbol is not
> located too far from the GOT, whatever registers are used in the
> instructions; they just need to be preserved.  See the implementation in
> bfd/elfxx-sparc.c for the GNU linker.

Ah, I see, so spilling/filling/copying around the register should be okay.
Thank you, I've told the mold folks about this.

Reply via email to