OSDN Git Service

[llvm-objdump] - Stop reporting bogus section IDs.
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 18 Jul 2018 08:34:35 +0000 (08:34 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 18 Jul 2018 08:34:35 +0000 (08:34 +0000)
commit10c3b3d15ed6a788ac12221b784caf81fb8248b5
tree5eef9f13fb7a464710a5320db6882754d1024c52
parent8b80d4ecc24c2a3155131a54125c0daf78f7624d
[llvm-objdump] - Stop reporting bogus section IDs.

Imagine we have a file with few sections, and one of them is .foo
with index N != 0.

Problem is that when llvm-objdump is given a -section=.foo parameter
it lists .foo as a section at index 0. That makes impossible to write
test cases which needs to find the index of the particular section,
while ignoring dumping of others.

The patch fixes that.

Differential revision: https://reviews.llvm.org/D49372

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337361 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objdump/X86/section-index.s [new file with mode: 0644]
tools/llvm-objdump/llvm-objdump.cpp