Recognize BSS-only DATA segments as sections that need to be slid
authorJason Molenda <jason@molenda.com>
Fri, 30 Jun 2023 00:50:21 +0000 (17:50 -0700)
committerJason Molenda <jason@molenda.com>
Fri, 30 Jun 2023 00:51:41 +0000 (17:51 -0700)
commit623e8455919af69b039fe7450118ba953423a027
tree46f4e4c547e9ebc0dc309c4ab6383af70cc2443e
parent35bb2bb21c62065ff327023bd7d541d273f53c86
Recognize BSS-only DATA segments as sections that need to be slid

ObjectFileMachO::SetLoadAddress() should allow for a DATA segment
that has no file content to be slid in the vmaddr, it is valid
to have such a section.

Differential Revision: https://reviews.llvm.org/D154037
rdar://99744343
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/test/API/macosx/bss-only-data-section-sliding/Makefile [new file with mode: 0644]
lldb/test/API/macosx/bss-only-data-section-sliding/TestBSSOnlyDataSectionSliding.py [new file with mode: 0644]
lldb/test/API/macosx/bss-only-data-section-sliding/main.c [new file with mode: 0644]