This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/63793] -mcmodel=medium in gfortran on x86_64 emits references that are RIP relative (instead of using the GOT)
- From: "howarth at bromo dot med.uc.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 14 Nov 2014 00:24:26 +0000
- Subject: [Bug middle-end/63793] -mcmodel=medium in gfortran on x86_64 emits references that are RIP relative (instead of using the GOT)
- Auto-submitted: auto-generated
- References: <bug-63793-4 at http dot gcc dot gnu dot org/bugzilla/>
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.