diff options
Diffstat (limited to 'lldb/source/Plugins/ObjectFile')
3 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index e4de46e24a1..688b64cca81 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1236,6 +1236,7 @@ ObjectFileELF::CreateSections(SectionList &unified_section_list) vm_size, // VM size in bytes of this section. header.sh_offset, // Offset of this section in the file. file_size, // Size of the section as found in the file. + __builtin_ffs(header.sh_addralign), // Alignment of the section header.sh_flags)); // Flags for this section. if (is_thread_specific) diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 9eab3a1dc17..9341e275096 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -1346,6 +1346,7 @@ ObjectFileMachO::CreateSections (SectionList &unified_section_list) load_cmd.vmsize, // VM size in bytes of this section load_cmd.fileoff, // Offset to the data for this section in the file load_cmd.filesize, // Size in bytes of this section as found in the the file + 0, // Segments have no alignment information load_cmd.flags)); // Flags for this section segment_sp->SetIsEncrypted (segment_is_encrypted); @@ -1474,6 +1475,7 @@ ObjectFileMachO::CreateSections (SectionList &unified_section_list) sect64.size, // VM size in bytes of this section sect64.offset, // Offset to the data for this section in the file sect64.offset ? sect64.size : 0, // Size in bytes of this section as found in the the file + sect64.align, load_cmd.flags)); // Flags for this section segment_sp->SetIsFake(true); @@ -1612,6 +1614,7 @@ ObjectFileMachO::CreateSections (SectionList &unified_section_list) sect64.size, sect64.offset, sect64.offset == 0 ? 0 : sect64.size, + sect64.align, sect64.flags)); // Set the section to be encrypted to match the segment @@ -2022,7 +2025,7 @@ ObjectFileMachO::ParseSymtab () uint32_t memory_module_load_level = eMemoryModuleLoadLevelComplete; - if (process) + if (process && m_header.filetype != llvm::MachO::MH_OBJECT) { Target &target = process->GetTarget(); diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp index ca70b96651a..7b853423459 100644 --- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -753,6 +753,7 @@ ObjectFilePECOFF::CreateSections (SectionList &unified_section_list) m_sect_headers[idx].vmsize, // VM size in bytes of this section m_sect_headers[idx].offset, // Offset to the data for this section in the file m_sect_headers[idx].size, // Size in bytes of this section as found in the the file + m_coff_header_opt.sect_alignment, // Section alignment m_sect_headers[idx].flags)); // Flags for this section //section_sp->SetIsEncrypted (segment_is_encrypted); |