[all-commits] [llvm/llvm-project] f80a43: [llvm-objdump] -r: print non-SHF_ALLOC relocations...

Fangrui Song via All-commits all-commits at lists.llvm.org
Fri Jul 1 09:08:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f80a4321ef1bafcd8041884bcb85d9ba24335adb
      https://github.com/llvm/llvm-project/commit/f80a4321ef1bafcd8041884bcb85d9ba24335adb
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-07-01 (Fri, 01 Jul 2022)

  Changed paths:
    R llvm/test/Object/dynamic-reloc.test
    M llvm/test/tools/llvm-objdump/ELF/dynamic-relocs.test
    A llvm/test/tools/llvm-objdump/ELF/relocations-in-nonreloc.test
    R llvm/test/tools/llvm-objdump/relocations-in-nonreloc.test
    M llvm/tools/llvm-objdump/llvm-objdump.cpp

  Log Message:
  -----------
  [llvm-objdump] -r: print non-SHF_ALLOC relocations for non-ET_REL files

ET_EXEC and ET_DYN files may contain non-SHF_ALLOC relocation sections
(e.g. ld --emit-relocs). Match GNU objdump by dumping them.

* Remove Object/dynamic-reloc.test. Replace it with a -r RUN line in dynamic-relocs.test
* Update relocations-in-nonreloc.test to set sh_link/sh_info. GNU
  objdump seems to ignore a SHT_REL/SHT_RELA section not linking to SHT_SYMTAB.
  The test did not test what it intended to test.

Fix https://github.com/llvm/llvm-project/issues/41246

Reviewed By: jhenderson

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




More information about the All-commits mailing list