elf: add PT_RISCV_ATTRIBUTES program header

Attribute is ignored for now.

It is supposed to check ABI compatiblity and reject loading incompatible images.
Haiku currently do not use multiple ABIs for RISC-V so it is safe to ignore attributes.

PT_RISCV_ATTRIBUTES program header is produced by default in GCC 13 and Clang 17.

Change-Id: I4659e9bacbf34a2a0bc16b34c2aaa37232d700fa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6948
Reviewed-by: David Karoly <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Alex von Gluck IV <[email protected]>
This commit is contained in:
X512
2023-09-25 15:20:13 +00:00
committed by waddlesplash
parent abd18fecf0
commit f83058d1ed
4 changed files with 11 additions and 0 deletions
+1
View File
@@ -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 */
+1
View File
@@ -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 */