[PATCH] D47098: [ELF] Make R_GOTONLY_PC_FROM_END R_GOTREL_FROM_END relative to _GLOBAL_OFFSET_TABLE_ instead of end of .got

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 29 14:00:50 PDT 2018


MaskRay updated this revision to Diff 148978.
MaskRay added a comment.

Add some comments why have to use:

  return (ElfSym::GlobalOffsetTable
              ? ElfSym::GlobalOffsetTable->getVA()
              : InX::Got->getVA() + InX::Got->getSize()) +
         A - P;

and when we can get rid of it.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D47098

Files:
  ELF/Arch/X86_64.cpp
  ELF/InputSection.cpp
  ELF/Relocations.cpp
  ELF/SyntheticSections.cpp
  ELF/Writer.cpp
  test/ELF/got-i386.s
  test/ELF/i386-gotoff-shared.s
  test/ELF/i386-gotpc-dynamic.s
  test/ELF/i386-gotpc.s
  test/ELF/relocation-i686.s
  test/ELF/x86-64-reloc-shared.s
  test/ELF/x86-64-reloc-shared2.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47098.148978.patch
Type: text/x-patch
Size: 12464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180529/0abeee39/attachment.bin>


More information about the llvm-commits mailing list