Skip to content

Commit 6a66b48

Browse files
ebahapoEvandro Menezes
authored andcommitted
riscv-elf.md: remove EF_RISCV_COMPACT
The compact code model can be linked with other code models, so the ELF header is probably not the best place for this information to reside. For LTO purposes, this information can be preserved in metadata. Additionally, remove some typos.
1 parent c6dc385 commit 6a66b48

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

riscv-elf.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,9 @@ rules about 2✕XLEN aligned arguments being passed in "aligned" register pairs.
453453
* e_flags: Describes the format of this ELF file. These flags are used by the
454454
linker to disallow linking ELF files with incompatible ABIs together.
455455

456-
Bit 0 | Bit 1 - 2 | Bit 3 | Bit 4 | Bit 5 | Bit 6 - 31
457-
-------|------------|-------|-------|---------|------------
458-
RVC | Float ABI | RVE | TSO | Compact | *Reserved*
456+
Bit 0 | Bit 1 - 2 | Bit 3 | Bit 4 | Bit 5 - 31
457+
-------|------------|-------|-------|------------
458+
RVC | Float ABI | RVE | TSO | _Reserved_
459459

460460

461461
* EF_RISCV_RVC (0x0001): This bit is set when the binary targets the C ABI,
@@ -481,8 +481,6 @@ rules about 2✕XLEN aligned arguments being passed in "aligned" register pairs.
481481
* EF_RISCV_RVE (0x0008): This bit is set when the binary targets the E ABI.
482482
* EF_RISCV_TSO (0x0010): This bit is set when the binary requires the RVTSO
483483
memory consistency model.
484-
* EF_RISCV_COMPACT (0x0020): This bit is set when the binary targets the
485-
compact code model.
486484

487485
Until such a time that the *Reserved* bits (0xffffffe0) are allocated by
488486
future versions of this specification, they shall not be set by standard
@@ -542,10 +540,10 @@ Enum | ELF Reloc Type | Description | Field
542540
30 | R_RISCV_TPREL_LO12_I | TLS LE thread offset | _I-Type_ | | `%tprel_lo(symbol)`
543541
31 | R_RISCV_TPREL_LO12_S | TLS LE thread offset | _S-Type_ | | `%tprel_lo(symbol)`
544542
32 | R_RISCV_TPREL_ADD | TLS LE thread usage | | | `%tprel_add(symbol)`
545-
33 | R_RISCV_ADD8 | 8-bit label addition | _word8_ | S + A + V
546-
34 | R_RISCV_ADD16 | 16-bit label addition | _word16_ | S + A + V
547-
35 | R_RISCV_ADD32 | 32-bit label addition | _word32_ | S + A + V
548-
36 | R_RISCV_ADD64 | 64-bit label addition | _word64_ | S + A + V
543+
33 | R_RISCV_ADD8 | 8-bit label addition | _word8_ | V + S + A
544+
34 | R_RISCV_ADD16 | 16-bit label addition | _word16_ | V + S + A
545+
35 | R_RISCV_ADD32 | 32-bit label addition | _word32_ | V + S + A
546+
36 | R_RISCV_ADD64 | 64-bit label addition | _word64_ | V + S + A
549547
37 | R_RISCV_SUB8 | 8-bit label subtraction | _word8_ | V - S - A
550548
38 | R_RISCV_SUB16 | 16-bit label subtraction | _word16_ | V - S - A
551549
39 | R_RISCV_SUB32 | 32-bit label subtraction | _word32_ | V - S - A
@@ -555,17 +553,17 @@ Enum | ELF Reloc Type | Description | Field
555553
43 | R_RISCV_ALIGN | Alignment statement |
556554
44 | R_RISCV_RVC_BRANCH | PC-relative branch offset | _CB-Type_ | S + A - P
557555
45 | R_RISCV_RVC_JUMP | PC-relative jump offset | _CJ-Type_ | S + A - P
558-
46 | R_RISCV_RVC_LUI | Absolute address | _CI-Type_ | S + A - P
556+
46 | R_RISCV_RVC_LUI | Absolute address | _CI-Type_ | S + A
559557
47 | R_RISCV_GPREL_I | GP-relative reference | _I-Type_ | S + A - GP
560558
48 | R_RISCV_GPREL_S | GP-relative reference | _S-Type_ | S + A - GP
561559
49 | R_RISCV_TPREL_I | TP-relative TLS LE load | _I-Type_
562560
50 | R_RISCV_TPREL_S | TP-relative TLS LE store | _S-Type_
563-
51 | R_RISCV_RELAX | Instruction pair can be relaxed |
564-
52 | R_RISCV_SUB6 | Local label subtraction |
565-
53 | R_RISCV_SET6 | Local label subtraction |
566-
54 | R_RISCV_SET8 | Local label subtraction |
567-
55 | R_RISCV_SET16 | Local label subtraction |
568-
56 | R_RISCV_SET32 | Local label subtraction |
561+
51 | R_RISCV_RELAX | Instruction pair can be relaxed | _word6_ | V - S - A
562+
52 | R_RISCV_SUB6 | Local label subtraction | _word6_ | S + A
563+
53 | R_RISCV_SET6 | Local label assignment | _word6_ | S + A
564+
54 | R_RISCV_SET8 | Local label assignment | _word8_ | S + A
565+
55 | R_RISCV_SET16 | Local label assignment | _word16_ | S + A
566+
56 | R_RISCV_SET32 | Local label assignment | _word32_ | S + A
569567
57 | R_RISCV_32_PCREL | PC-relative reference | _word32_ | S + A - P
570568
58 | R_RISCV_IRELATIVE | Runtime relocation | _wordclass_ | `ifunc_resolver(B + A)`
571569
59 | R_RISCV_64_PCREL | PC-relative reference | _word64_ | S + A - P

0 commit comments

Comments
 (0)