[all-commits] [llvm/llvm-project] 90d195: [ELF] Delete relOff from TargetInfo::writePLT

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Dec 16 11:10:21 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 90d195d026f5c90e26f09614e23d4112b3dfaaa1
      https://github.com/llvm/llvm-project/commit/90d195d026f5c90e26f09614e23d4112b3dfaaa1
  Author: Fangrui Song <maskray at google.com>
  Date:   2019-12-16 (Mon, 16 Dec 2019)

  Changed paths:
    M lld/ELF/Arch/AArch64.cpp
    M lld/ELF/Arch/ARM.cpp
    M lld/ELF/Arch/Hexagon.cpp
    M lld/ELF/Arch/Mips.cpp
    M lld/ELF/Arch/PPC.cpp
    M lld/ELF/Arch/PPC64.cpp
    M lld/ELF/Arch/RISCV.cpp
    M lld/ELF/Arch/SPARCV9.cpp
    M lld/ELF/Arch/X86.cpp
    M lld/ELF/Arch/X86_64.cpp
    M lld/ELF/SyntheticSections.cpp
    M lld/ELF/Target.h
    M lld/test/ELF/gnu-ifunc-i386.s
    M lld/test/ELF/gnu-ifunc-plt-i386.s

  Log Message:
  -----------
  [ELF] Delete relOff from TargetInfo::writePLT

This change only affects EM_386. relOff can be computed from `index`
easily, so it is unnecessarily passed as a parameter.

Both in.plt and in.iplt entries are written by writePLT. For in.iplt,
the instruction `push reloc_offset` will change because `index` is now
different. Fortunately, this does not matter because `push; jmp` is only
used by PLT. IPLT does not need the code sequence.

Reviewed By: grimar, ruiu

Differential Revision: https://reviews.llvm.org/D71518




More information about the All-commits mailing list