llvm-objdump: Do not attempt to disassemble symbols outside of section
authorSimon Atanasyan <simon@atanasyan.com>
Mon, 24 Feb 2014 22:12:11 +0000 (22:12 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Mon, 24 Feb 2014 22:12:11 +0000 (22:12 +0000)
commit341d0f4b9e8219024093a9cc35dd7b321eaaa0f1
treee552d8cb0d9ef9f1485e8e308d849bf5f5d4138c
parente5f1c6d3dae658cbdd19bf3ab5eea0573c95a531
llvm-objdump: Do not attempt to disassemble symbols outside of section
boundaries.

It is possible to create an ELF executable where symbol from say .text
section 'points' to the address outside the section boundaries. It does
not have a sense to disassemble something outside the section.

Without this fix llvm-objdump prints finite or infinite (depends on
the executable file architecture) number of 'invalid instruction
encoding' warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202083 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objdump/Inputs/out-of-section-sym.elf-i386 [new file with mode: 0644]
test/tools/llvm-objdump/Inputs/out-of-section-sym.s [new file with mode: 0644]
test/tools/llvm-objdump/out-of-section-sym.test [new file with mode: 0644]
tools/llvm-objdump/llvm-objdump.cpp