summaryrefslogtreecommitdiff
path: root/src/base/loader
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/loader')
-rw-r--r--src/base/loader/elf_object.cc6
-rw-r--r--src/base/loader/elf_object.hh2
-rw-r--r--src/base/loader/object_file.hh3
3 files changed, 11 insertions, 0 deletions
diff --git a/src/base/loader/elf_object.cc b/src/base/loader/elf_object.cc
index f6a18db8a..b6253adbe 100644
--- a/src/base/loader/elf_object.cc
+++ b/src/base/loader/elf_object.cc
@@ -415,6 +415,12 @@ ElfObject::loadLocalSymbols(SymbolTable *symtab, Addr addrMask)
}
bool
+ElfObject::loadWeakSymbols(SymbolTable *symtab, Addr addrMask)
+{
+ return loadSomeSymbols(symtab, STB_WEAK, addrMask);
+}
+
+bool
ElfObject::loadSections(PortProxy& memProxy, Addr addrMask)
{
if (!ObjectFile::loadSections(memProxy, addrMask))
diff --git a/src/base/loader/elf_object.hh b/src/base/loader/elf_object.hh
index 350a80db1..d3d3e5197 100644
--- a/src/base/loader/elf_object.hh
+++ b/src/base/loader/elf_object.hh
@@ -71,6 +71,8 @@ class ElfObject : public ObjectFile
std::numeric_limits<Addr>::max());
virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask =
std::numeric_limits<Addr>::max());
+ virtual bool loadWeakSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max());
virtual bool isDynamic() { return sectionExists(".interp"); }
virtual bool hasTLS() { return sectionExists(".tbss"); }
diff --git a/src/base/loader/object_file.hh b/src/base/loader/object_file.hh
index 4a789d321..bdc9a31a1 100644
--- a/src/base/loader/object_file.hh
+++ b/src/base/loader/object_file.hh
@@ -89,6 +89,9 @@ class ObjectFile
std::numeric_limits<Addr>::max()) = 0;
virtual bool loadLocalSymbols(SymbolTable *symtab, Addr addrMask =
std::numeric_limits<Addr>::max()) = 0;
+ virtual bool loadWeakSymbols(SymbolTable *symtab, Addr addrMask =
+ std::numeric_limits<Addr>::max())
+ { return false; }
virtual bool isDynamic() { return false; }
virtual bool hasTLS() { return false; }