From b54e11862878cf88a427fa225407d1128abd21f2 Mon Sep 17 00:00:00 2001 From: "Deyuan Guo ext:(%2C%20Nilay%20Vaish%20%3Cnilay%40cs.wisc.edu%3E)" Date: Wed, 17 Apr 2013 16:07:19 -0500 Subject: base: load weak symbols from object file Without loading weak symbols into gem5, some function names and the given PC cannot correspond correctly, because the binding attributes of unction names in an ELF file are not only STB_GLOBAL or STB_LOCAL, but also STB_WEAK. This patch adds a function for loading weak symbols. Committed by: Nilay Vaish --- src/sim/process.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/sim') diff --git a/src/sim/process.cc b/src/sim/process.cc index 22a886303..1654ea5c5 100644 --- a/src/sim/process.cc +++ b/src/sim/process.cc @@ -574,7 +574,8 @@ LiveProcess::LiveProcess(LiveProcessParams * params, ObjectFile *_objFile) if (!debugSymbolTable) { debugSymbolTable = new SymbolTable(); if (!objFile->loadGlobalSymbols(debugSymbolTable) || - !objFile->loadLocalSymbols(debugSymbolTable)) { + !objFile->loadLocalSymbols(debugSymbolTable) || + !objFile->loadWeakSymbols(debugSymbolTable)) { // didn't load any symbols delete debugSymbolTable; debugSymbolTable = NULL; -- cgit v1.2.3