[PATCH] D30699: [ELF] - Stop producing broken output for R_386_GOT32X relocation.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 13:16:23 PDT 2017
H.J.Lu,
This may be a dumb question, but why didn't you define new types of
relocations for GOT/GOTX without base registers? Making relocations change
their behavior based on instructions where they applied doesn't seem like a
cleaner way than defining new relocations.
On Wed, Apr 5, 2017 at 1:14 PM, Rui Ueyama via Phabricator <
reviews at reviews.llvm.org> wrote:
> ruiu added inline comments.
>
>
> ================
> Comment at: ELF/Target.cpp:394
> + // resolves to an offset in GOT table (R_GOT_FROM_END), but when
> instruction
> + // pointed by relocation has no base register, this relocation can be
> used
> + // when PIC code is disabled. In that case it resolves to address of
> entry
> ----------------
> What is "this" in this sentence?
>
>
> ================
> Comment at: ELF/Target.cpp:406
> + error(toString(S.File) +
> + ": relocation R_386_GOT32/R_386_GOT32X against '" +
> S.getName() +
> + "' without base register can not be used when PIC enabled");
> ----------------
> You want to use `toString(Type)` instead of R_386_GOT32/R_386_GOT32X.
>
>
> https://reviews.llvm.org/D30699
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170405/3a5b8ea3/attachment.html>
More information about the llvm-commits
mailing list