diff --git a/riscv-elf.adoc b/riscv-elf.adoc index d1f722eb..f6e89fb7 100644 --- a/riscv-elf.adoc +++ b/riscv-elf.adoc @@ -1137,8 +1137,8 @@ specification versions are merged. === Mapping Symbol -Section can have a mixture of code and data or code with different ISAs, -mapping symbol is a special symbol class used for describe the boundaries. +The section can have a mixture of code and data or code with different ISAs; +mapping symbol is a special symbol class used to describe the boundaries. [%autowidth] |=== @@ -1148,28 +1148,30 @@ mapping symbol is a special symbol class used for describe the boundaries. | $x | Start of a sequence of instructions with extension. |=== -Mapping symbol for data(`$d`) means following region are data. +The mapping symbol for data(`$d`) means the following region is data. -Mapping symbol for instruction(`$x`) means following region are instructions, -and it has an optional ISA string, which means following code region are using -ISA different than the ISA recorded in arch attribute, the ISA information will -used until next instruction mapping symobl; an instruction mapping symobl -without ISA string means using ISA configuration from ELF attribute. +The mapping symbol for instruction(`$x`) means the following region are +instructions, +and it has an optional ISA string, which means the following code regions are +using ISA is different than the ISA recorded in the arch attribute; +the ISA information will used until the next instruction mapping symbol; +an instruction mapping symbol without ISA string means using ISA configuration +from ELF attribute. -Format and rule of the optional ISA string is same as Tag_RISCV_arch, must +Format and rule of the optional ISA string are same as Tag_RISCV_arch, must having explicit version, more detailed rule please refer to <>. -NOTE: The use case for mapping symbol for instruction(`$x`) with ISA information is -used with ifunc, e.g. library are built with `rv64gc`, but few functions -like memcpy provide two version, one built with `rv64gc`, and one built with -`rv64gcv`, and select by ifunc mechanism at run-time; however the arch -attribute is recording for minimal execution environment requirement, so the ISA -information from arch attribute isn't enough for disassembler to disassemble the -`rv64gcv` version correctly. - -NOTE: For toolchain implementation, linker are permit to merge the adjacency -mapping symbol if they are exactly same type, and strip tool are permit to -strip mapping symbol. +NOTE: The use case for mapping symbol for instruction(`$x`) with ISA information +is used with ifunc, e.g. libraries are built with `rv64gc`, but few functions +like memcpy provides two versions, one built with `rv64gc`, and one built with +`rv64gcv`, and select by ifunc mechanism at run-time; however, the arch +attribute is recording for minimal execution environment requirements, so the +ISA information from arch attribute is not enough for the disassembler to +disassemble the `rv64gcv` version correctly. + +NOTE: For toolchain implementation, the linker is permitted to merge the +adjacency mapping symbol if they are exactly the same symbol name, and strip +tools are permitted to strip mapping symbol. == Linker Relaxation