Skip to content

Commit 5e28741

Browse files
committed
[LLDB][ELF] Also ignore section type when matching.
The section type can change when using `objcopy --only-keep-debug`, apparently. rdar://124467787
1 parent 39c6fce commit 5e28741

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,13 +1865,12 @@ static SectionSP FindMatchingSection(const SectionList &section_list,
18651865
addr_t vm_addr = section->GetFileAddress();
18661866
ConstString name = section->GetName();
18671867
offset_t byte_size = section->GetByteSize();
1868-
SectionType type = section->GetType();
18691868
bool thread_specific = section->IsThreadSpecific();
18701869
uint32_t permissions = section->GetPermissions();
18711870
uint32_t alignment = section->GetLog2Align();
18721871

18731872
for (auto sect : section_list) {
1874-
if (sect->GetName() == name && sect->GetType() == type &&
1873+
if (sect->GetName() == name &&
18751874
sect->IsThreadSpecific() == thread_specific &&
18761875
sect->GetPermissions() == permissions &&
18771876
sect->GetByteSize() == byte_size && sect->GetFileAddress() == vm_addr &&

0 commit comments

Comments
 (0)