]> granicus.if.org Git - llvm/commit
[llvm-objcopy] Add e_machine validity check for reserved section indexes
authorPetr Hosek <phosek@chromium.org>
Wed, 13 Sep 2017 03:04:50 +0000 (03:04 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 13 Sep 2017 03:04:50 +0000 (03:04 +0000)
commit16aceb828ae693d23787b1b6d7f692d8e19351cf
tree0b22a258fa2ec19949db7d5388716426c2bd8914
parent7f15442f60592b4ea2618dad980494316b163aff
[llvm-objcopy] Add e_machine validity check for reserved section indexes

As discussed on llvm-commits it was decided it would be best to check
e_machine before declaring that a reserved section index is valid. The
only special e_machine value that matters here is EM_HEXAGON. This
change adds a special check for EM_HEXAGON.

Patch by Jake Ehrlich

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313114 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objcopy/common-symbol.test
tools/llvm-objcopy/Object.cpp