diff options
author | Rui Ueyama <ruiu@google.com> | 2014-11-19 02:07:10 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2014-11-19 02:07:10 +0000 |
commit | 970dda295e708a54df1c9516c365a915ba68e96c (patch) | |
tree | be55dcaa1f2808d0baf81e2cb9a972108d721d57 /llvm/lib/Object/COFFObjectFile.cpp | |
parent | 13d123ccf76e235e687b06d3ab6943d2fb5e2059 (diff) | |
download | bcm5719-llvm-970dda295e708a54df1c9516c365a915ba68e96c.tar.gz bcm5719-llvm-970dda295e708a54df1c9516c365a915ba68e96c.zip |
llvm-readobj: fix off-by-one error in COFFDumper
It printed out base relocation table header as table entry.
This patch also makes llvm-readobj to not skip ABSOLUTE entries
becuase it was confusing.
llvm-svn: 222299
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/COFFObjectFile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index c5d7c409519..d5ff7d6439c 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -1491,7 +1491,7 @@ void BaseRelocRef::moveNext() { // Header->BlockSize is the size of the current block, including the // size of the header itself. uint32_t Size = sizeof(*Header) + - sizeof(coff_base_reloc_block_entry) * Index; + sizeof(coff_base_reloc_block_entry) * (Index + 1); if (Size == Header->BlockSize) { // .reloc contains a list of base relocation blocks. Each block // consists of the header followed by entries. The header contains |