[all-commits] [llvm/llvm-project] 8ec73e: [ELF] getRelocatedSection: remove the check for ET...

Amir Aupov via All-commits all-commits at lists.llvm.org
Mon Jun 7 13:17:18 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ec73e96b72d04787ed606cfbb62a7a2a05b3711
      https://github.com/llvm/llvm-project/commit/8ec73e96b72d04787ed606cfbb62a7a2a05b3711
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2021-06-07 (Mon, 07 Jun 2021)

  Changed paths:
    M llvm/include/llvm/Object/ELFObjectFile.h
    M llvm/include/llvm/Object/ObjectFile.h
    M llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
    M llvm/lib/Object/XCOFFObjectFile.cpp
    M llvm/unittests/Object/ELFObjectFileTest.cpp

  Log Message:
  -----------
  [ELF] getRelocatedSection: remove the check for ET_REL object file

getRelocatedSection interface should not check that the object file is
relocatable, as executable files may have relocations preserved with
`--emit-relocs` linker flag. The relocations are useful in context of post-link
binary analysis for function reference identification. For example, BOLT relies
on relocations to perform function reordering.

Reviewed By: MaskRay, jhenderson

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




More information about the All-commits mailing list