llvm-6502/lib/Object
David Majnemer 5b1b9844e7 Object, COFF: Cap the section contents to min(VirtualSize, SizeOfRawData)
It is not useful to return the data beyond VirtualSize it's less than
SizeOfRawData.

An implementation detail of COFF requires the section size to be rounded
up to a multiple of FileAlignment; this means that SizeOfRawData is not
representative of how large the section is.  Instead, we should cap it
to VirtualSize when this occurs as it represents the true size of the
section.

Note that this is only relevant in executable files because this
rounding doesn't occur in object files (and VirtualSize is always zero).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219388 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-09 07:49:28 +00:00
..
Archive.cpp Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
Binary.cpp unique_ptrify MachOUniversalBinary::create 2014-09-03 17:41:05 +00:00
CMakeLists.txt
COFFObjectFile.cpp Object, COFF: Cap the section contents to min(VirtualSize, SizeOfRawData) 2014-10-09 07:49:28 +00:00
COFFYAML.cpp
ELF.cpp AArch64: add support for dynamic-loader relocations 2014-08-11 10:10:27 +00:00
ELFObjectFile.cpp Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
ELFYAML.cpp
Error.cpp Converting object's error_category to a ManagedStatic to avoid static constructors and destructors. 2014-09-19 22:09:18 +00:00
IRObjectFile.cpp LTO: introduce object file-based on-disk module format. 2014-09-18 21:28:49 +00:00
LLVMBuild.txt
MachOObjectFile.cpp Remove bogus std::error_code returns form SectionRef. 2014-10-08 15:28:58 +00:00
MachOUniversal.cpp unique_ptrify MachOUniversalBinary::create 2014-09-03 17:41:05 +00:00
Makefile
Object.cpp Remove bogus std::error_code returns form SectionRef. 2014-10-08 15:28:58 +00:00
ObjectFile.cpp Don't own the buffer in object::Binary. 2014-08-19 18:44:46 +00:00
RecordStreamer.cpp
RecordStreamer.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
SymbolicFile.cpp LTO: introduce object file-based on-disk module format. 2014-09-18 21:28:49 +00:00