Skip to content

Commit

Permalink
Update rule for the label value for handling zero value
Browse files Browse the repository at this point in the history
  • Loading branch information
kito-cheng committed Sep 26, 2024
1 parent 39725f1 commit c870b64
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions riscv-elf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1550,9 +1550,11 @@ scheme as the "Function types" mangling rule defined in the _Itanium {Cpp} ABI_
defined in the _Itanium {Cpp} ABI_.

The label value is derived from the lower 20 bits of the MD5 hash result of the
function signature string. If the lower 20 bits are all zeros, the higher 20
bits are used. If all 32 bits are zeros, the lower 20 bits of the MD5 hash
result of the string "RISC-V" are used.
function signature string. If the lower 20 bits are all zeros, use the next
20 bits, and continue using the next 20 bits until a non-zero value is obtained.
If less than 20 bits are available in the final segment, the highest 20 bits of
the MD5 hash result will be used. If all 128 bits are zeros, the lower 20 bits
of the MD5 hash result of the string "RISC-V" are used.

Additionally, here are a few specific rules:

Expand Down

0 comments on commit c870b64

Please sign in to comment.