summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/DynamicLoader
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-04-16 21:01:30 +0000
committerGreg Clayton <gclayton@apple.com>2012-04-16 21:01:30 +0000
commit1e8ac36b605e90c46b8d445dc300456978f75e4d (patch)
tree1253a6535cd361a42fa9c31e88bead07f5974870 /lldb/source/Plugins/DynamicLoader
parent73d96651abf8f6b1c145e2384f3c9cafa9f80ea7 (diff)
downloadbcm5719-llvm-1e8ac36b605e90c46b8d445dc300456978f75e4d.tar.gz
bcm5719-llvm-1e8ac36b605e90c46b8d445dc300456978f75e4d.zip
Fixed the ability to load multiple __LINKEDIT segments at the same address for darwin shared cache entries. Now when registering the load address of a section, the DynamicLoader objects can specify if they should warn or not. This will fix the ability to load the nlist entries for shared libraries in the darwin shared caches when no on disk representation is available for a shared library.
llvm-svn: 154860
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader')
-rw-r--r--lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index dd7a101fc9f..2ea134c42d7 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -440,18 +440,18 @@ DynamicLoaderMacOSXDYLD::UpdateImageLoadAddress (Module *module, DYLDImageInfo&
if (section_sp)
{
- // Don't ever load any __LINKEDIT sections since the ones in the shared
- // cached will be coalesced into a single section and we will get warnings
- // about multiple sections mapping to the same address.
- if (section_sp->GetName() != g_section_name_LINKEDIT)
+ // __LINKEDIT sections from files in the shared cache
+ // can overlap so check to see what the segment name is
+ // and pass "false" so we don't warn of overlapping
+ // "Section" objects, and "true" for all other sections.
+ const bool warn_multiple = section_sp->GetName() != g_section_name_LINKEDIT;
+
+ const addr_t old_section_load_addr = m_process->GetTarget().GetSectionLoadList().GetSectionLoadAddress (section_sp.get());
+ if (old_section_load_addr == LLDB_INVALID_ADDRESS ||
+ old_section_load_addr != new_section_load_addr)
{
- const addr_t old_section_load_addr = m_process->GetTarget().GetSectionLoadList().GetSectionLoadAddress (section_sp.get());
- if (old_section_load_addr == LLDB_INVALID_ADDRESS ||
- old_section_load_addr != new_section_load_addr)
- {
- if (m_process->GetTarget().GetSectionLoadList().SetSectionLoadAddress (section_sp.get(), new_section_load_addr))
- changed = true;
- }
+ if (m_process->GetTarget().GetSectionLoadList().SetSectionLoadAddress (section_sp.get(), new_section_load_addr, warn_multiple))
+ changed = true;
}
}
else
OpenPOWER on IntegriCloud