aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2024-07-01 21:56:33 -0700
committerGitHub <noreply@github.com>2024-07-01 21:56:33 -0700
commit91c0ef6f67821eb7298cb05988045e92354ac77b (patch)
treece4b2812f5108cfc47b4ac93123b853de1291f09 /clang/lib/Frontend/InitPreprocessor.cpp
parent6f60d2b807a4a719ac98288aec961dbb8433bb4b (diff)
downloadllvm-91c0ef6f67821eb7298cb05988045e92354ac77b.zip
llvm-91c0ef6f67821eb7298cb05988045e92354ac77b.tar.gz
llvm-91c0ef6f67821eb7298cb05988045e92354ac77b.tar.bz2
[lldb] [ObjectFileMachO] BSS segments are loadable segments (#96983)
ObjectFileMachO::SetLoadAddress sets the address of each segment in a binary in a Target, but it ignores segments that are not loaded in the virtual address space. It was marking segments that were purely BSS -- having no content in the file, but in zero-initialized memory when running in the virtual address space -- as not-loadable, unless they were named "DATA". This works pretty well for typical userland binaries, but in less Darwin environments, there may be BSS segments with other names, that ARE loadable. I looked at the origin of SectionIsLoadable's check for this, and it was a cleanup by Greg in 2018 where we had three different implementations of the idea in ObjectFileMachO and one of them skipped zero-file-size segments (BSS), which made it into the centralized SectionIsLoadable method. Also add some logging to the DynamicLoader log channel when loading a binary - it's the first place I look when debugging segment address setting bugs, and it wasn't emitting anything. rdar://129870649
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions