]> granicus.if.org Git - llvm/commit
Revert r374931 "[llvm-objdump] Use a counter for llvm-objdump -h instead of the secti...
authorHans Wennborg <hans@hanshq.net>
Thu, 17 Oct 2019 08:52:29 +0000 (08:52 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 17 Oct 2019 08:52:29 +0000 (08:52 +0000)
commit45311834539ec8d38f9da4794a346b711235d0a2
treee51150ce33da665819e239f91b5ef3672e45c63a
parentd9a54d74efb6ee32f45c1c906a69e06cedc63995
Revert r374931 "[llvm-objdump] Use a counter for llvm-objdump -h instead of the section index."

This broke llvm-objdump in 32-bit builds, see e.g.
http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/10925

> Summary:
> When listing the index in `llvm-objdump -h`, use a zero-based counter instead of the actual section index (e.g. shdr->sh_index for ELF).
>
> While this is effectively a noop for now (except one unit test for XCOFF), the index values will change in a future patch that filters certain sections out (e.g. symbol tables). See D68669 for more context. Note: the test case in `test/tools/llvm-objdump/X86/section-index.s` already covers the case of incrementing the section index counter when sections are skipped.
>
> Reviewers: grimar, jhenderson, espindola
>
> Reviewed By: grimar
>
> Subscribers: emaste, sbc100, arichardson, aheejin, arphaman, seiya, llvm-commits, MaskRay
>
> Tags: #llvm
>
> Differential Revision: https://reviews.llvm.org/D68848

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375088 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objdump/xcoff-section-headers.test
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-objdump/llvm-objdump.h