[ELF] - R_386_GOT32 relocation calculation fix.
R_386_GOT32 has multiple descriptions: "System V Application Binary Interface Intel386 Architecture Processor Supplement Version 1.1" (https://github.com/hjl-tools/x86-psABI/wiki/intel386-psABI-1.1.pdf), p36 contains next calculation for R_386_GOT32: G + A - GOT. SYSTEM V APPLICATION BINARY INTERFACE 4 (https://refspecs.linuxfoundation.org/elf/abi386-4.pdf, p78) tolds us its G + A - P. Oracle docs (https://docs.oracle.com/cd/E19455-01/816-0559/chapter6-26/index.html) says its should be G + A. gold/bfd calculates it as "G + A - GOT", but GOT means the end of the GOT section. Patch fixes current calculation to gold/ld behavior. Differential revision: http://reviews.llvm.org/D15750 llvm-svn: 258115
Loading
Please sign in to comment