mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +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
|
@ -10,6 +10,8 @@
|
|||
|
||||
#if ARCH(AARCH64)
|
||||
# include <Userland/Libraries/LibELF/Arch/aarch64/GenericDynamicRelocationType.h>
|
||||
#elif ARCH(RISCV64)
|
||||
# include <Userland/Libraries/LibELF/Arch/riscv64/GenericDynamicRelocationType.h>
|
||||
#elif ARCH(X86_64)
|
||||
# include <Userland/Libraries/LibELF/Arch/x86_64/GenericDynamicRelocationType.h>
|
||||
#else
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Sönke Holz <sholz8530@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Userland/Libraries/LibELF/ELFABI.h>
|
||||
|
||||
#include <AK/Platform.h>
|
||||
VALIDATE_IS_RISCV64()
|
||||
|
||||
namespace ELF {
|
||||
|
||||
enum class GenericDynamicRelocationType : unsigned {
|
||||
NONE = R_RISCV_NONE,
|
||||
ABSOLUTE = R_RISCV_64,
|
||||
COPY = R_RISCV_COPY,
|
||||
// there is no R_RISCV_GLOB_DAT
|
||||
JUMP_SLOT = R_RISCV_JUMP_SLOT,
|
||||
RELATIVE = R_RISCV_RELATIVE,
|
||||
TLS_DTPMOD = R_RISCV_TLS_DTPMOD64,
|
||||
TLS_DTPREL = R_RISCV_TLS_DTPREL64,
|
||||
TLS_TPREL = R_RISCV_TLS_TPREL64,
|
||||
TLSDESC = R_RISCV_TLSDESC,
|
||||
IRELATIVE = R_RISCV_IRELATIVE,
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue