[PATCH] D31528: [ELF][MIPS] Multi-GOT implementation

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 06:16:32 PDT 2017


arichardson added a comment.

In https://reviews.llvm.org/D31528#715906, @ruiu wrote:

> This is not your fault, but I have to say that this MIPS GOT layout is very odd, too different from other architectures, and too complicated.  I want to avoid supporting this unless I'm convinced that it is absolutely necessary. It seems to me that MIPS needs a clean, common new ABI. Only the MIPS ABI imposes a lot of restrictions on the size of GOT sections and the order of GOT section members, even though MIPS as a processor is an ordinary RISC ISA. This change would really hurt maintainability of LLD which I already found some MIPS-specific behavior is hard to keep it right when editing code for all the other architectures.
>
> I wonder what is the performance penalty you would have to pay when you use the -mxgot option. With the option, you'll need three instructions as opposed to a single instruction to access an GOT entry. Does that actually make observable difference in performance?


`-mxgot` does not seem to be enough to run many binaries on FreeBSD mips64. I think this is because local static variables are still accessed using a single 16 bit offset and for larger programs this is not sufficient. I am currently trying to build postgres for MIPS FreeBSD and without the multigot patch I can't link it although all source files are being compiled with -mxgot.


Repository:
  rL LLVM

https://reviews.llvm.org/D31528





More information about the llvm-commits mailing list