mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
Don't wait for the dynamic loader to set a module as a dynamic link editor, figure it out through the ObjectFile.
Background: dyld binaries often have extra symbols in their symbol table like "malloc" and "free" for the early bringup of dyld and we often don't want to set breakpoints in dynamic linker binaries. We also don't want to call the "malloc" or "free" function in dyld when a user writes an expression like "(void *)malloc(123)" so we need to avoid doing name lookups in dyld. We mark Modules as being dynamic link editors and this helps do correct lookups for breakpoints by name and function lookups. <rdar://problem/19716267> llvm-svn: 228261
This commit is contained in:
@@ -5296,6 +5296,12 @@ ObjectFileMachO::GetSDKVersion(uint32_t *versions, uint32_t num_versions)
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
ObjectFileMachO::GetIsDynamicLinkEditor()
|
||||
{
|
||||
return m_header.filetype == llvm::MachO::MH_DYLINKER;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------
|
||||
// PluginInterface protocol
|
||||
//------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user