This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/63793] -mcmodel=medium in gfortran on x86_64 emits references that are RIP relative (instead of using the GOT)


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

--- Comment #11 from howarth at bromo dot med.uc.edu ---
FYI, the darwin linker developer had the following comments on @GOTOFF..

> This may be a red herring.
> 
> @GOTOFF is a different concept.  IIRC, the ELF runtime sets of RBX to point
>  to the GOT table.  @GOTOFF is for accessing variables that are a (link time)
> fixed offset in the GOT table.
> 
> Darwin does not support @GOTOFF at all.  Local variables are accessed 
> RIP-rel, or if large, indirectly via @GOT.

However, outside of the sections of gcc/config/i386/i386.[c/md] conditional on
HAVE_AS_GOTOFF_IN_DATA, I don't see any other obvious places where %rip would
be emitted for Mach-O but not linux.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]