diff options
author | George Rimar <grimar@accesssoftek.com> | 2017-04-08 06:14:14 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2017-04-08 06:14:14 +0000 |
commit | e7bf9688031427a47cb51aed1d4e7c947e70b358 (patch) | |
tree | 0a362a5c33444c0c11b4041919b427f7e76d5cf1 /llvm/include/llvm-c/Target.h | |
parent | 3d941bc69675e1cc22289e5ede0f0450d245f2a1 (diff) | |
download | bcm5719-llvm-e7bf9688031427a47cb51aed1d4e7c947e70b358.tar.gz bcm5719-llvm-e7bf9688031427a47cb51aed1d4e7c947e70b358.zip |
[ELF] - Stop producing broken output for R_386_GOT32[X] relocations.
Previously we silently produced broken output for R_386_GOT32X/R_386_GOT32
relocations if they were used to compute the address of the symbol’s global
offset table entry without base register when position-independent code is disabled.
Situation happened because of recent ABI changes. Released ABI mentions that
R_386_GOT32X can be calculated in a two different ways (so we did not follow ABI here
before this patch), but draft ABI also mentions R_386_GOT32 relocation here.
We should use the same calculations for both relocations.
Problem is that we always calculated them as G + A - GOT (offset from end of GOT),
but for case when PIC is disabled, according to i386 ABI calculation should be G + A,
what should produce just an address in GOT finally.
ABI: https://github.com/hjl-tools/x86-psABI/wiki/intel386-psABI-draft.pdf (p36, p60).
llvm-svn: 299812
Diffstat (limited to 'llvm/include/llvm-c/Target.h')
0 files changed, 0 insertions, 0 deletions