https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122538
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu.org
Keywords|wrong-code |
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
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.