[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 03:13:31 PDT 2017
grimar added a comment.
In https://reviews.llvm.org/D30699#698529, @joerg wrote:
> Are we talking about statically or dynamically linked programs? It makes a different for the former, but shouldn't for the latter.
Why ? Issue is not relative to static/dynamic linking I believe.
We have "movl foo at GOT, %eax",
lld generates currenly:
8b 05 fc ff ff ff mov 0xfffffffc,%eax, where 0xfffffffc is offset.
but bfd generates:
8b 05 fc 9f 04 08 mov 0x8049ffc,%eax, where 08049ffc is address in .got
That the issue I am trying to fix, it does not seem to be relative with static/dynamic linked programs.
It is just about wrong relocation calculation for case when there is no base register in instructiuon.
"movl foo at GOT, %eax" is restricted for use in PIC code.
Patch adds a error for that: "relocation R_386_GOT32X against 'ifunc' without base register can not be used when PIC enabled".
https://reviews.llvm.org/D30699
More information about the llvm-commits
mailing list