[ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools
authorSimon Atanasyan <simon@atanasyan.com>
Fri, 3 Jul 2015 23:00:54 +0000 (23:00 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Fri, 3 Jul 2015 23:00:54 +0000 (23:00 +0000)
commitafc0340d960f3cb3179ada4907b7cd748a703db8
tree244dc5109779b8734bb77704991881b3fbc8bd2b
parentb8115096135a3d64166c72672d44a98c859a92ef
[ELFYAML] Fix handling SHT_NOBITS sections by obj2yaml/yaml2obj tools

SHT_NOBITS sections do not have content in an object file. Now the yaml2obj
tool does not accept `Content` field for such sections, and the obj2yaml
tool does not attempt to read the section content from a file.

Restore r241350 and r241352.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241377 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ELFYAML.h
lib/Object/ELFYAML.cpp
test/Object/obj2yaml.test
test/Object/yaml2obj-elf-rel-noref.yaml
tools/obj2yaml/elf2yaml.cpp
tools/yaml2obj/yaml2elf.cpp