[all-commits] [llvm/llvm-project] 95e4db: [llvm-objdump] --adjust-vma: Call getInstruction w...

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue May 20 08:55:14 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 95e4db8fa7d4adf1cd629e3fa7877ec95a1adfaa
      https://github.com/llvm/llvm-project/commit/95e4db8fa7d4adf1cd629e3fa7877ec95a1adfaa
  Author: Fangrui Song <i at maskray.me>
  Date:   2025-05-20 (Tue, 20 May 2025)

  Changed paths:
    A llvm/test/tools/llvm-objdump/ELF/SystemZ/adjust-vma.test
    M llvm/test/tools/llvm-objdump/X86/elf-disassemble-symbololize-operands.yaml
    M llvm/tools/llvm-objdump/llvm-objdump.cpp

  Log Message:
  -----------
  [llvm-objdump] --adjust-vma: Call getInstruction with adjusted address

llvm-objdump currently calls MCDisassembler::getInstruction with
unadjusted address and MCInstPrinter::printInst with adjusted address.
The decoded branch targets will be adjusted as expected for most targets
(as the getInstruction address is insignificant) but not for SystemZ
(where the getInstruction address is displayed).

Specify an adjust address to fix SystemZInstPrinter output.

The added test utilizes llvm/utils/update_test_body.py to make updates
easier and additionally checks that we don't adjust SHN_ABS symbol
addresses.

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



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