@@ -1369,29 +1369,30 @@ A number of symbols, named mapping symbols, describe the boundaries.
13691369The mapping symbol should set the type to `STT_NOTYPE`, binding to `STB_LOCAL`,
13701370and the size of symbol to zero.
13711371
1372- The mapping symbol for data(`$d`) indicates the start of a sequence of data bytes.
1372+ The mapping symbol for data(`$d`) indicates the start of a sequence of data
1373+ bytes.
13731374
13741375The mapping symbol for instruction(`$x`) indicates the start of a sequence of
1375- instructions.
1376- and it has an optional ISA string, which means the following code regions are
1377- using ISA is different than the ISA recorded in the arch attribute;
1378- the ISA information will used until the next instruction mapping symbol;
1379- an instruction mapping symbol without ISA string means using ISA configuration
1380- from ELF attribute.
1381-
1382- Format and rule of the optional ISA string are same as `Tag_RISCV_arch`, must
1383- having explicit version, more detailed rule please refer to <<Attributes>>.
1376+ instructions. It has an optional ISA string that indicates the following code
1377+ regions are using ISA which is different from the ISA recorded in the arch
1378+ attribute. The optional ISA information, when present, will be used until the
1379+ next instruction mapping symbol. An instruction mapping symbol without ISA
1380+ string means using ISA configuration from ELF attribute. The format and rules
1381+ of the optional ISA string are same as `Tag_RISCV_arch` and must have explicit
1382+ version. For more detailed rules, please refer to <<Attributes>>.
13841383
13851384The mapping symbol can be followed by an optional uniquifier, which is prefixed
13861385with a dot (`.`).
13871386
13881387NOTE: The use case for mapping symbol for instruction(`$x`) with ISA information
1389- is used with ifunc, e.g. libraries are built with `rv64gc`, but few functions
1390- like memcpy provides two versions, one built with `rv64gc`, and one built with
1391- `rv64gcv`, and select by ifunc mechanism at run-time; however, the arch
1392- attribute is recording for minimal execution environment requirements, so the
1393- ISA information from arch attribute is not enough for the disassembler to
1394- disassemble the `rv64gcv` version correctly.
1388+ is used with `IFUNC`. Consider a scenario where C library is built with `rv64gc`
1389+ but few functions like memcpy may provide two versions, one built with `rv64gc`
1390+ and another built with `rv64gcv`, and the `IFUNC` mechanism selects one version
1391+ of those at run-time. However, the arch attribute is recorded for the minimal
1392+ execution environment requirements, so the ISA information from arch attribute
1393+ is not enough for the disassembler to disassemble the `rv64gcv` version
1394+ correctly. Specifying ISA string appropriately with the two memcpy instruction
1395+ mapping symbols helps the disassembler to disassemble instructions correctly.
13951396
13961397== Linker Relaxation
13971398
0 commit comments