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

--- Comment #13 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
(In reply to Florian Weimer from comment #11)
> I'm surprised that you can load from .data.rel.ro using la.local. Isn't it
> possible for RELRO data (which is writable at first, so separate from code)
> very far away from any text section?  I'm going by the name “la.local” only
> here, I don't know anything about the architecture.  I associate “local”
> with “sort, limited displacement”. 8-)

We are loading the address of something in .data.rel.ro using la.local, then
using that address to load the actual data.  And as I've said in the previous
comment it seems just reinventing a GOT entry...

global/local basically means preemptible or not, i.e. la.global = la.got,
la.local = la.pcrel (unless overriding it with something like
-Wa,-mla-global-with-pcrel which was used by things like the kernel before GCC
have -mdirect-extern-access).

Reply via email to