Skip to content

Commit

Permalink
Adjust merge rule, made it more clearly on the merge result
Browse files Browse the repository at this point in the history
  • Loading branch information
kito-cheng committed Jul 24, 2023
1 parent b6791fa commit 3c11c42
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1182,21 +1182,32 @@ specification versions are merged.
Tag_RISCV_atomic_abi denotes the atomic ABI used within this object
file. Its values are defined as follows:

.RISC-V attributes
[cols="4,>2,2,5"]
[cols="1,2,5"]
[width=100%]
|===
| Value | Symbolic Name | Compatibility | Description
| Value | Symbolic Name | Description

| 0 | UNKNOWN_ATOMIC_ABI | Compatible with all other value. | This object use unknown atomic ABI.
| 1 | A6C_ATOMIC_ABI | Compatible with unknown and A6S_ATOMIC_ABI. | This object use the A6 classical atomic ABI, which defined in table A.6 in <<riscv-unpriv-20191213>>.
| 2 | A6S_ATOMIC_ABI | Compatible with unknown and A6C_ATOMIC_ABI. | This object use the strengthened A6 ABI, which defined in <<Mappings from C/C++ primitives to RISC-V primitives>>.
| 0 | UNKNOWN_ATOMIC_ABI | This object use unknown atomic ABI.
| 1 | A6C_ATOMIC_ABI | This object use the A6 classical atomic ABI, which defined in table A.6 in <<riscv-unpriv-20191213>>.
| 2 | A6S_ATOMIC_ABI | This object use the strengthened A6 ABI, which defined in <<Mappings from C/C++ primitives to RISC-V primitives>>.
|===

Merge policy:::
The linker should report errors if object files of incompatible atomic ABI
beginning merged, the compatibility rules for atomic ABIs can be found in
compatibility column in the above table.
compatibility column in the following table.

[cols="6,2,3"]
[width=100%]
|===
| Input Values | Compatible? | Ouput Value

| UNKNOWN_ATOMIC_ABI and A6C_ATOMIC_ABI | Yes | A6C_ATOMIC_ABI
| UNKNOWN_ATOMIC_ABI and A6S_ATOMIC_ABI | Yes | A6S_ATOMIC_ABI
| A6C_ATOMIC_ABI and A6S_ATOMIC_ABI | Yes | A6C_ATOMIC_ABI
|===

NOTE: Merging object files with the same ABI will result in the same ABI.

=== Mapping Symbol

Expand Down

0 comments on commit 3c11c42

Please sign in to comment.