[all-commits] [llvm/llvm-project] 175aa0: [Propeller] Make decoding BBAddrMaps trace through...

Aiden Grossman via All-commits all-commits at lists.llvm.org
Mon Mar 13 14:30:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 175aa049c7c1a319289a27aca538e9ba59111383
      https://github.com/llvm/llvm-project/commit/175aa049c7c1a319289a27aca538e9ba59111383
  Author: Aiden Grossman <agrossman154 at yahoo.com>
  Date:   2023-03-13 (Mon, 13 Mar 2023)

  Changed paths:
    M llvm/include/llvm/Object/ELF.h
    M llvm/lib/Object/ELF.cpp
    M llvm/lib/Object/ELFObjectFile.cpp
    M llvm/test/tools/llvm-objdump/X86/elf-bbaddrmap-disassemble-symbolize-operands.yaml
    A llvm/test/tools/llvm-objdump/X86/elf-bbaddrmap-symbolize-relocatable.yaml
    A llvm/test/tools/llvm-readobj/ELF/bb-addr-map-relocatable.test
    M llvm/tools/llvm-objdump/llvm-objdump.cpp
    M llvm/tools/llvm-readobj/ELFDumper.cpp

  Log Message:
  -----------
  [Propeller] Make decoding BBAddrMaps trace through relocations

Currently when using the LLVM tools (eg llvm-readobj, llvm-objdump) to
find information about basic block locations using the propeller tooling
in relocatable object files function addresses are not mapped properly
which causes problems. In llvm-readobj this means that incorrect
function names will be pulled. In llvm-objdum this means that most BBs
won't show up in the output if --symbolize-operands is used. This patch
changes the behavior of decodeBBAddrMap to trace through relocations
to get correct function addresses if it is going through a relocatable
object file. This fixes the behavior in both tools and also other
consumers of decodeBBAddrMap. Some helper functions have been added
in/refactoring done to aid in grabbing BB address map sections now that
in some cases both relocation and BB address map sections need to be
obtained at the same time.

Regression tests moved around/added.

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




More information about the All-commits mailing list