Skip to content

Commit

Permalink
Add X32 in e_flags
Browse files Browse the repository at this point in the history
  • Loading branch information
Liaoshihua authored May 19, 2023
1 parent 0578fb7 commit 6fcf6b3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ below.
+
[[e-flags-layout]]
.Layout of e_flags
[cols="1,2,1,1,3,5"]
[cols="1,2,1,1,1,3,5"]
[width=80%]
|===
| Bit 0 | Bits 1 - 2 | Bit 3 | Bit 4 | Bits 5 - 23 | Bits 24 - 31
| Bit 0 | Bits 1 - 2 | Bit 3 | Bit 4 | Bit 5 | Bits 6 - 23 | Bits 24 - 31

| RVC | Float ABI | RVE | TSO | *Reserved* | *Non-standard extensions*
| RVC | Float ABI | RVE | TSO | X32 | *Reserved* | *Non-standard extensions*
|===

+
Expand Down Expand Up @@ -233,6 +233,9 @@ below.
EF_RISCV_TSO (0x0010)::: This bit is set when the binary requires the RVTSO
memory consistency model.

EF_RISCV_X32 (0x0020)::: This bit is set when the binary requires the ILP32
ABI on RV64* ISAs.

Until such a time that the *Reserved* bits (0x00ffffe0) are allocated by future
versions of this specification, they shall not be set by standard software.
Non-standard extensions are free to use bits 24-31 for any purpose. This may
Expand Down Expand Up @@ -268,6 +271,10 @@ raise an error.
TSO::: Linker should report errors if object files of different value
for TSO field.


X32::: Linker should report errors if object files of different value
for X32 field.

NOTE: The static linker may ignore the compatibility checks if all fields in the
`e_flags` are zero and all sections in the input file are non-executable
sections.
Expand Down

0 comments on commit 6fcf6b3

Please sign in to comment.