[PATCH] D30699: [ELF] - Stop producing broken output for R_386_GOT32X relocation.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 06:37:29 PDT 2017


grimar added a comment.

In https://reviews.llvm.org/D30699#699109, @joerg wrote:

> Statically linked binaries don't normally have a GOT, but should synthesize an entry in .data for it. Chances are that is exactly the problem you are seeing?


Case I am fixing in this patch is next:
https://lists.gnu.org/archive/html/bug-binutils/2015-10/msg00332.html
I think we have exactly the same issue as gold had that time.

R_386_GOT32X has 2 ways of calculation according to ABI. G + A or G + A - GOT, depending on was base register used or not.
Both ways of calculation assumes we have GOT entry. Difference is do we write offset from end of GOT or GOT entry address.
If there is no GOT then different relocation should be emited by producer I belive.


https://reviews.llvm.org/D30699





More information about the llvm-commits mailing list