Skip to content

Commit

Permalink
Reserve e_flags bits 24 through 31 for custom use
Browse files Browse the repository at this point in the history
Whilst here, correctly pluralise some headers and use consistent
alignment.

Closes: #157
  • Loading branch information
jrtc27 committed Jul 9, 2021
1 parent 6ecd27f commit 1cbd002
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions riscv-elf.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,9 @@ rules about 2×XLEN aligned arguments being passed in "aligned" register pa
* e_flags: Describes the format of this ELF file. These flags are used by the
linker to disallow linking ELF files with incompatible ABIs together.

Bit 0 | Bit 1 - 2 | Bit 3 | Bit 4 | Bit 5 - 31
-------|------------|-------|-------|------------
RVC | Float ABI | RVE | TSO | *Reserved*
Bit 0 | Bits 1 - 2 | Bit 3 | Bit 4 | Bits 5 - 23 | Bits 24 - 31
-------|------------|-------|-------|-------------|---------------------------
RVC | Float ABI | RVE | TSO | *Reserved* | *Non-standard extensions*

* EF_RISCV_RVC (0x0001): This bit is set when the binary targets the C ABI,
which allows instructions to be aligned to 16-bit boundaries (the base RV32
Expand All @@ -497,9 +497,10 @@ rules about 2×XLEN aligned arguments being passed in "aligned" register pa
* EF_RISCV_TSO (0x0010): This bit is set when the binary requires the RVTSO
memory consistency model.

Until such a time that the *Reserved* bits (0xffffffe0) are allocated by
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.
software. Non-standard extensions are free to use bits 24-31 for any purpose.
This many conflict with other non-standard extensions.

## <a name=sections></a>Sections

Expand Down

0 comments on commit 1cbd002

Please sign in to comment.