mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
feat(linker): allow use of local symbols
This commit adds support for handling local symbols. * Added 2 fields to SymbolInfo - binding, and associated instructions segment id. * Simplified code for decoding elf symbols and relocations. * Simplified code for patching instruction segments. * Changed logic of decodeElfSymbolTableAndRelocations: * Add every global symbol to symbol map. * Add any local symbol used by relocation to symbol map. * Changed logic of link: * After performing relocations remove local symbols from map. * Replaced UNRECOVERABLE_IF with returning error. * Removed LocalSymbolInfo structure used before for local kernel jumps. * Removed old tests. Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c8b90613a8
commit
5caf7f7290
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -27,7 +27,6 @@ struct WhiteBox<NEO::LinkerInput> : NEO::LinkerInput {
|
||||
using BaseClass::extFuncSymbols;
|
||||
using BaseClass::extFunDependencies;
|
||||
using BaseClass::kernelDependencies;
|
||||
using BaseClass::localSymbols;
|
||||
using BaseClass::parseRelocationForExtFuncUsage;
|
||||
using BaseClass::symbols;
|
||||
using BaseClass::textRelocations;
|
||||
@@ -39,11 +38,10 @@ template <>
|
||||
struct WhiteBox<NEO::Linker> : NEO::Linker {
|
||||
using BaseClass = NEO::Linker;
|
||||
using BaseClass::BaseClass;
|
||||
using BaseClass::localRelocatedSymbols;
|
||||
using BaseClass::patchDataSegments;
|
||||
using BaseClass::patchInstructionsSegments;
|
||||
using BaseClass::processRelocations;
|
||||
using BaseClass::relocatedSymbols;
|
||||
using BaseClass::relocateSymbols;
|
||||
using BaseClass::resolveExternalFunctions;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user