Skip to content

Commit 3f4a97a

Browse files
committed
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 2b2f883 commit 3f4a97a

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
@@ -413,9 +413,9 @@ rules about 2✕XLEN aligned arguments being passed in "aligned" register pairs.
413413
* e_flags: Describes the format of this ELF file. These flags are used by the
414414
linker to disallow linking ELF files with incompatible ABIs together.
415415

416-
Bit 0 | Bit 1 - 2 | Bit 3 | Bit 4 | Bit 5 | Bit 6 - 31
417-
-------|------------|-------|-------|---------|------------
418-
RVC | Float ABI | RVE | TSO | Compact | *Reserved*
416+
Bit 0 | Bit 1 - 2 | Bit 3 | Bit 4 | Bit 5 - 31
417+
-------|------------|-------|-------|------------
418+
RVC | Float ABI | RVE | TSO | _Reserved_
419419

420420

421421
* EF_RISCV_RVC (0x0001): This bit is set when the binary targets the C ABI,
@@ -441,8 +441,6 @@ rules about 2✕XLEN aligned arguments being passed in "aligned" register pairs.
441441
* EF_RISCV_RVE (0x0008): This bit is set when the binary targets the E ABI.
442442
* EF_RISCV_TSO (0x0010): This bit is set when the binary requires the RVTSO
443443
memory consistency model.
444-
* EF_RISCV_COMPACT (0x0020): This bit is set when the binary targets the
445-
compact code model.
446444

447445
Until such a time that the *Reserved* bits (0xffffffe0) are allocated by
448446
future versions of this specification, they shall not be set by standard
@@ -502,10 +500,10 @@ Enum | ELF Reloc Type | Description | Field
502500
30 | R_RISCV_TPREL_LO12_I | TLS LE thread offset | _I-Type_ | | `%tprel_lo(symbol)`
503501
31 | R_RISCV_TPREL_LO12_S | TLS LE thread offset | _S-Type_ | | `%tprel_lo(symbol)`
504502
32 | R_RISCV_TPREL_ADD | TLS LE thread usage | | | `%tprel_add(symbol)`
505-
33 | R_RISCV_ADD8 | 8-bit label addition | _word8_ | S + A + V
506-
34 | R_RISCV_ADD16 | 16-bit label addition | _word16_ | S + A + V
507-
35 | R_RISCV_ADD32 | 32-bit label addition | _word32_ | S + A + V
508-
36 | R_RISCV_ADD64 | 64-bit label addition | _word64_ | S + A + V
503+
33 | R_RISCV_ADD8 | 8-bit label addition | _word8_ | V + S + A
504+
34 | R_RISCV_ADD16 | 16-bit label addition | _word16_ | V + S + A
505+
35 | R_RISCV_ADD32 | 32-bit label addition | _word32_ | V + S + A
506+
36 | R_RISCV_ADD64 | 64-bit label addition | _word64_ | V + S + A
509507
37 | R_RISCV_SUB8 | 8-bit label subtraction | _word8_ | V - S - A
510508
38 | R_RISCV_SUB16 | 16-bit label subtraction | _word16_ | V - S - A
511509
39 | R_RISCV_SUB32 | 32-bit label subtraction | _word32_ | V - S - A
@@ -515,17 +513,17 @@ Enum | ELF Reloc Type | Description | Field
515513
43 | R_RISCV_ALIGN | Alignment statement |
516514
44 | R_RISCV_RVC_BRANCH | PC-relative branch offset | _CB-Type_ | S + A - P
517515
45 | R_RISCV_RVC_JUMP | PC-relative jump offset | _CJ-Type_ | S + A - P
518-
46 | R_RISCV_RVC_LUI | Absolute address | _CI-Type_ | S + A - P
516+
46 | R_RISCV_RVC_LUI | Absolute address | _CI-Type_ | S + A
519517
47 | R_RISCV_GPREL_I | GP-relative reference | _I-Type_ | S + A - GP
520518
48 | R_RISCV_GPREL_S | GP-relative reference | _S-Type_ | S + A - GP
521519
49 | R_RISCV_TPREL_I | TP-relative TLS LE load | _I-Type_
522520
50 | R_RISCV_TPREL_S | TP-relative TLS LE store | _S-Type_
523-
51 | R_RISCV_RELAX | Instruction pair can be relaxed |
524-
52 | R_RISCV_SUB6 | Local label subtraction |
525-
53 | R_RISCV_SET6 | Local label subtraction |
526-
54 | R_RISCV_SET8 | Local label subtraction |
527-
55 | R_RISCV_SET16 | Local label subtraction |
528-
56 | R_RISCV_SET32 | Local label subtraction |
521+
51 | R_RISCV_RELAX | Instruction pair can be relaxed | _word6_ | V - S - A
522+
52 | R_RISCV_SUB6 | Local label subtraction | _word6_ | S + A
523+
53 | R_RISCV_SET6 | Local label assignment | _word6_ | S + A
524+
54 | R_RISCV_SET8 | Local label assignment | _word8_ | S + A
525+
55 | R_RISCV_SET16 | Local label assignment | _word16_ | S + A
526+
56 | R_RISCV_SET32 | Local label assignment | _word32_ | S + A
529527
57 | R_RISCV_32_PCREL | PC-relative reference | _word32_ | S + A - P
530528
58 | R_RISCV_IRELATIVE | Runtime relocation | _wordclass_ | `ifunc_resolver(B + A)`
531529
59 | R_RISCV_64_PCREL | PC-relative reference | _word64_ | S + A - P

0 commit comments

Comments
 (0)