forked from OSchip/llvm-project
Be sure to set the data offset to zero if we actually mmap the entire ELF file.
llvm-svn: 174668
This commit is contained in:
parent
d2cc63f10b
commit
64ff6c70da
|
@ -192,7 +192,8 @@ ObjectFileELF::CreateInstance (const lldb::ModuleSP &module_sp,
|
|||
// Update the data to contain the entire file if it doesn't already
|
||||
if (data_sp->GetByteSize() < length) {
|
||||
data_sp = file->MemoryMapFileContents(file_offset, length);
|
||||
magic = data_sp->GetBytes() + data_offset;
|
||||
data_offset = 0;
|
||||
magic = data_sp->GetBytes();
|
||||
}
|
||||
unsigned address_size = ELFHeader::AddressSizeInBytes(magic);
|
||||
if (address_size == 4 || address_size == 8)
|
||||
|
|
Loading…
Reference in New Issue