loader: Load weak symbols for function tracing
authorDeyuan Guo <guodeyuan@tsinghua.org.cn>
Mon, 15 Jul 2013 22:08:57 +0000 (18:08 -0400)
committerDeyuan Guo <guodeyuan@tsinghua.org.cn>
Mon, 15 Jul 2013 22:08:57 +0000 (18:08 -0400)
src/base/loader/elf_object.cc

index b6253adbe13453b2030a1162eb26a29f9b6ce2de..6d4c29776328185e261665ad9195ff309caad179 100644 (file)
@@ -411,7 +411,9 @@ ElfObject::loadGlobalSymbols(SymbolTable *symtab, Addr addrMask)
 bool
 ElfObject::loadLocalSymbols(SymbolTable *symtab, Addr addrMask)
 {
-    return loadSomeSymbols(symtab, STB_LOCAL, addrMask);
+    bool found_local = loadSomeSymbols(symtab, STB_LOCAL, addrMask);
+    bool found_weak = loadSomeSymbols(symtab, STB_WEAK, addrMask);
+    return found_local || found_weak;
 }
 
 bool