Skip to content

Commit 777bb7d

Browse files
authored
Merge pull request #3 from Liaoshihua/rv64ilp32-dev
Change X32 Flag to N32
2 parents f946be9 + 5ce110d commit 777bb7d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/elf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ typedef struct {
14471447
#define EF_RISCV_FLOAT_ABI_QUAD 0x0006
14481448
#define EF_RISCV_RVE 0x0008
14491449
#define EF_RISCV_TSO 0x0010
1450-
#define EF_RISCV_X32 0x0020
1450+
#define EF_RISCV_N32 0x0020
14511451

14521452
typedef struct elf32_rel {
14531453
Elf32_Addr r_offset;

linux-user/elfload.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1697,8 +1697,8 @@ static void elf_core_copy_regs(target_elf_gregset_t *regs,
16971697
#define ELF_START_MMAP 0x80000000
16981698
#define ELF_ARCH EM_RISCV
16991699

1700-
#ifndef ABI_X32_P
1701-
#define ABI_X32_P(e_flags) ((e_flags & EF_RISCV_X32) != 0)
1700+
#ifndef ABI_N32_P
1701+
#define ABI_N32_P(e_flags) ((e_flags & EF_RISCV_N32) != 0)
17021702
#endif
17031703

17041704
#if defined(TARGET_RISCV32) || defined(TARGET_RISCV64ILP32)
@@ -2063,7 +2063,7 @@ static bool elf_check_ident(struct elfhdr *ehdr)
20632063
&& ehdr->e_ident[EI_MAG2] == ELFMAG2
20642064
&& ehdr->e_ident[EI_MAG3] == ELFMAG3
20652065
#ifdef TARGET_RISCV64ILP32
2066-
&& ABI_X32_P(ehdr->e_flags)
2066+
&& ABI_N32_P(ehdr->e_flags)
20672067
#endif
20682068
&& ehdr->e_ident[EI_CLASS] == ELF_CLASS
20692069
&& ehdr->e_ident[EI_DATA] == ELF_DATA

0 commit comments

Comments
 (0)