diff --git a/headers/build/os/kernel/elf.h b/headers/build/os/kernel/elf.h index e3c3fa0586..d2d4c49b63 100644 --- a/headers/build/os/kernel/elf.h +++ b/headers/build/os/kernel/elf.h @@ -339,6 +339,7 @@ typedef struct { #define PT_LOPROC 0x70000000 #define PT_ARM_UNWIND 0x70000001 +#define PT_RISCV_ATTRIBUTES 0x70000003 #define PT_HIPROC 0x7fffffff /* program header segment flags */ diff --git a/headers/os/kernel/elf.h b/headers/os/kernel/elf.h index 98dac80f32..ca9dacc118 100644 --- a/headers/os/kernel/elf.h +++ b/headers/os/kernel/elf.h @@ -350,6 +350,7 @@ typedef struct { #define PT_LOPROC 0x70000000 #define PT_ARM_UNWIND 0x70000001 +#define PT_RISCV_ATTRIBUTES 0x70000003 #define PT_HIPROC 0x7fffffff /* program header segment flags */ diff --git a/src/system/kernel/elf.cpp b/src/system/kernel/elf.cpp index 1699b9f1a7..3f5e7996f5 100644 --- a/src/system/kernel/elf.cpp +++ b/src/system/kernel/elf.cpp @@ -2279,6 +2279,9 @@ load_kernel_add_on(const char *path) continue; case PT_ARM_UNWIND: continue; + case PT_RISCV_ATTRIBUTES: + // TODO: check ABI compatibility attributes + continue; default: dprintf("%s: unhandled pheader type %#" B_PRIx32 "\n", fileName, programHeaders[i].p_type); diff --git a/src/system/runtime_loader/elf_load_image.cpp b/src/system/runtime_loader/elf_load_image.cpp index 928fe229b6..438fc1582f 100644 --- a/src/system/runtime_loader/elf_load_image.cpp +++ b/src/system/runtime_loader/elf_load_image.cpp @@ -88,6 +88,9 @@ count_regions(const char* imagePath, char const* buff, int phnum, int phentsize) case PT_ARM_UNWIND: // will be handled in libgcc_s.so.1 break; + case PT_RISCV_ATTRIBUTES: + // TODO: check ABI compatibility attributes + break; default: FATAL("%s: Unhandled pheader type in count 0x%" B_PRIx32 "\n", imagePath, pheaders->p_type); @@ -219,6 +222,9 @@ parse_program_headers(image_t* image, char* buff, int phnum, int phentsize) case PT_ARM_UNWIND: // will be handled in libgcc_s.so.1 break; + case PT_RISCV_ATTRIBUTES: + // TODO: check ABI compatibility attributes + break; default: FATAL("%s: Unhandled pheader type in parse 0x%" B_PRIx32 "\n", image->path, pheader->p_type);