[llvm-dev] PIC and mcmodel=large on x86 doesn't use any relocations

Joerg Sonnenberger via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 27 13:04:28 PDT 2016


On Thu, Oct 27, 2016 at 02:42:54PM -0400, John Reagan via llvm-dev wrote:
> We're at the point in our port of OpenVMS to x86 using LLVM to make choices
> on mcmodel.  Given OpenVMS's history, our linker will allocate static data
> (ie, .data, .bss, .plt, GOT, etc.) in the bottom 32-bits of address space
> (ie, 00000000.xxxxxxxx).  However, we support code anywhere in the 64-bit
> address space as PIC code (we do this on Itanium today using our own
> code-generator and linker).  Given this requirement, I'm looking at the
> support for -fPIC and -mcmodel=large.  Either I'm missing something or there
> is something broken (and has been for quite a while).

I don't think we support the large code model on amd64 for anything but
JIT use. I'm generally not sure how much point there really is. Do you
actually have individual share objects larger than 2GB? It's not a
problem to have multiple DSOs that span much more than 2GB, but doing
that inside a single object is very expensive.

Joerg


More information about the llvm-dev mailing list