mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-30 08:21:20 +00:00
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:
1 parent
d2cc63f10b
commit
64ff6c70da
1 file changed
+2
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user