File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1018,10 +1018,26 @@ linker or runtime loader needs to check compatibility.
10181018Attributes are encoded in a vendor-specific section of type SHT_RISCV_ATTRIBUTES
10191019and name .riscv.attributes. The value of an attribute can hold an integer
10201020encoded in the uleb128 format or a null-terminated byte string (NTBS).
1021+ The tag number is also encoded as uleb128.
10211022
10221023RISC-V attributes have a string value if the tag number is odd and an integer
10231024value if the tag number is even.
10241025
1026+ ==== Layout of .riscv.attributes section
1027+
1028+ The attributes section start with a format-version (uint8 = 'A') followed by
1029+ vendor specific sub-section(s). A sub-section starts with sub-section length
1030+ (uint32), vendor name (NTBS) and one or more sub-sub-section(s).
1031+
1032+ A sub-sub-section consists of a tag (uleb128), sub-sub-section length (uint32)
1033+ followed by actual attribute tag,value pair(s) as specified above.
1034+ Sub-sub-section Tag Tag_file (value 1) specifies that contained attibutes
1035+ relate to whole file.
1036+
1037+ A sub-section with name "riscv\0" is mandatory. Vendor specific sub-sections
1038+ are allowed in future. Vendor names starting with "[Aa]non" are reserved for
1039+ non-standard ABI extensions.
1040+
10251041==== List of attributes
10261042
10271043.RISC-V attributes
You can’t perform that action at this time.
0 commit comments