mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:57:42 +00:00
LibELF+readelf: Add support for RISC-V dynamic relocation types
This commit is contained in:
parent
f8628f94b8
commit
0b0ea19d12
5 changed files with 63 additions and 1 deletions
|
@ -536,7 +536,7 @@ void DynamicLoader::load_program_headers()
|
|||
|
||||
DynamicLoader::RelocationResult DynamicLoader::do_direct_relocation(DynamicObject::Relocation const& relocation,
|
||||
Optional<DynamicLoader::CachedLookupResult>& cached_result,
|
||||
ShouldInitializeWeak should_initialize_weak,
|
||||
[[maybe_unused]] ShouldInitializeWeak should_initialize_weak,
|
||||
ShouldCallIfuncResolver should_call_ifunc_resolver)
|
||||
{
|
||||
FlatPtr* patch_ptr = nullptr;
|
||||
|
@ -603,6 +603,7 @@ DynamicLoader::RelocationResult DynamicLoader::do_direct_relocation(DynamicObjec
|
|||
*patch_ptr = call_ifunc_resolver(VirtualAddress { *patch_ptr }).get();
|
||||
break;
|
||||
}
|
||||
#if !ARCH(RISCV64)
|
||||
case GLOB_DAT: {
|
||||
auto symbol = relocation.symbol();
|
||||
auto res = lookup_symbol(symbol);
|
||||
|
@ -633,6 +634,7 @@ DynamicLoader::RelocationResult DynamicLoader::do_direct_relocation(DynamicObjec
|
|||
*patch_ptr = symbol_location.get();
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case RELATIVE: {
|
||||
if (!image().is_dynamic())
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue