Register and add among JT reasons FunctionSymbol

The symbol handling has been extended to register whether a symbol
represents a function or not. This information is then used to register,
during the global data harvesting phase, all the function symbols and
explicitly mark them through the "FunctionSymbol" `JTReason`.

We use this information during the CFEP harvesting phase to integrate
the information produced by the function boundaries detection with
potential unidentified CFEPs.

This option can be enabled with the `--use-debug-symbols`, which
supersedes `--use-sections`.
This commit is contained in:
Andrea Gussoni
2018-04-26 18:19:06 +02:00
committed by Alessandro Di Federico
parent 6e642ea6f9
commit 500d77f43e
14 changed files with 69 additions and 33 deletions
+5 -4
View File
@@ -385,10 +385,11 @@ void BinaryFile::parseELF(object::ObjectFile *TheBinary,
// Collect symbol names
for (auto &Symbol : TheELF.symbols(SymtabShdr)) {
Symbols.push_back({
Symbol.getName(StrtabContent).get(),
Symbol.st_value,
Symbol.st_size
});
Symbol.getName(StrtabContent).get(),
Symbol.st_value,
Symbol.st_size,
Symbol.getType() == ELF::STT_FUNC
});
}
}