Zebin: don't fail when extfunc caller cannot be found

This commit removes early fail in linking with zebin and external
functions which happens when, there's a relocation to external functions
section, but it's not modifying any external function. And only treats
GLOBAL FUNC symbols pointing to external functions section as external
function symbols.

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
Krystian Chmielewski
2022-03-29 19:28:59 +00:00
committed by Compute-Runtime-Automation
parent 7cd4ca5ce7
commit 6023a5b58e
3 changed files with 8 additions and 24 deletions

View File

@@ -35,10 +35,6 @@ enum class LinkingStatus : uint32_t {
LinkedFully,
LinkedPartially
};
enum class SymbolBind : uint8_t {
Local,
Global
};
inline const char *asString(SegmentType segment) {
switch (segment) {
@@ -57,7 +53,6 @@ struct SymbolInfo {
uint32_t offset = std::numeric_limits<uint32_t>::max();
uint32_t size = std::numeric_limits<uint32_t>::max();
SegmentType segment = SegmentType::Unknown;
SymbolBind bind = SymbolBind::Local;
};
struct LinkerInput {
@@ -156,7 +151,7 @@ struct LinkerInput {
}
protected:
void parseRelocationForExtFuncUsage(RelocationInfo relocInfo, std::string kernelName);
void parseRelocationForExtFuncUsage(const RelocationInfo &relocInfo, const std::string &kernelName);
Traits traits;
SymbolMap symbols;