Skip to content

Commit 5d372ea

Browse files
authored
[LLDB][DYLD] Remove logic around not rebasing when main executable has a load address (#110885)
This is a part of #109477 that I'm making into it's own patch. Here we remove logic from the DYLD that prevents it's logic from running if the main executable already has a load address. Instead we let the DYLD fully determine what should be loaded and what shouldn't.
1 parent d4c1789 commit 5d372ea

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,6 @@ void DynamicLoaderPOSIXDYLD::DidAttach() {
108108
// if we dont have a load address we cant re-base
109109
bool rebase_exec = load_offset != LLDB_INVALID_ADDRESS;
110110

111-
// if we have a valid executable
112-
if (executable_sp.get()) {
113-
lldb_private::ObjectFile *obj = executable_sp->GetObjectFile();
114-
if (obj) {
115-
// don't rebase if the module already has a load address
116-
Target &target = m_process->GetTarget();
117-
Address addr = obj->GetImageInfoAddress(&target);
118-
if (addr.GetLoadAddress(&target) != LLDB_INVALID_ADDRESS)
119-
rebase_exec = false;
120-
}
121-
} else {
122-
// no executable, nothing to re-base
123-
rebase_exec = false;
124-
}
125-
126111
// if the target executable should be re-based
127112
if (rebase_exec) {
128113
ModuleList module_list;

0 commit comments

Comments
 (0)