[all-commits] [llvm/llvm-project] 2f37a2: [llvm-objdump] -r: support CREL

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Jul 8 09:14:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f37a22f10a1128c695bc469871a9101edce853e
      https://github.com/llvm/llvm-project/commit/2f37a22f10a1128c695bc469871a9101edce853e
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-07-08 (Mon, 08 Jul 2024)

  Changed paths:
    M llvm/include/llvm/Object/ELF.h
    M llvm/include/llvm/Object/ELFObjectFile.h
    M llvm/lib/Object/ELF.cpp
    M llvm/lib/Object/ELFObjectFile.cpp
    A llvm/test/tools/llvm-objdump/ELF/crel.test
    M llvm/test/tools/llvm-objdump/X86/elf-disassemble-relocs.test
    M llvm/tools/llvm-objdump/ELFDump.cpp
    M llvm/tools/llvm-objdump/llvm-objdump.cpp

  Log Message:
  -----------
  [llvm-objdump] -r: support CREL

Extract the llvm-readelf decoder to `decodeCrel` (#91280) and reuse it
for llvm-objdump.

Because the section representation of LLVMObject (`SectionRef`) is
64-bit, insufficient to hold all decoder states, `section_rel_begin` is
modified to decode CREL eagerly and hold the decoded relocations inside
ELFObjectFile<ELFT>.

The test is adapted from llvm/test/tools/llvm-readobj/ELF/crel.test.

Pull Request: https://github.com/llvm/llvm-project/pull/97382



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list