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 @@ -1016,10 +1016,26 @@ linker or runtime loader needs to check compatibility.
10161016Attributes are encoded in a vendor-specific section of type SHT_RISCV_ATTRIBUTES
10171017and name .riscv.attributes. The value of an attribute can hold an integer
10181018encoded in the uleb128 format or a null-terminated byte string (NTBS).
1019+ The tag number is also encoded as uleb128.
10191020
10201021RISC-V attributes have a string value if the tag number is odd and an integer
10211022value if the tag number is even.
10221023
1024+ ==== Layout of .riscv.attributes section
1025+
1026+ The attributes section start with a format-version (uint8 = 'A') followed by
1027+ vendor specific sub-section(s). A sub-section starts with sub-section length
1028+ (uint32), vendor name (NTBS) and one or more sub-sub-section(s).
1029+
1030+ A sub-sub-section consists of a tag (uleb128), sub-sub-section length (uint32)
1031+ followed by actual attribute tag,value pair(s) as specified above.
1032+ Sub-sub-section Tag Tag_file (value 1) specifies that contained attibutes
1033+ relate to whole file.
1034+
1035+ A sub-section with name "riscv\0" is mandatory. Vendor specific sub-sections
1036+ are allowed in future. Vendor names starting with "[Aa]non" are reserved for
1037+ non-standard ABI extensions.
1038+
10231039==== List of attributes
10241040
10251041.RISC-V attributes
You can’t perform that action at this time.
0 commit comments