From 46fc7e43a9c9b77f0d99c36a98ab65b63a45691e Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Wed, 22 Mar 2023 23:48:15 +0800 Subject: [PATCH] Allow optional uniquifier for mapping symbol --- riscv-elf.adoc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/riscv-elf.adoc b/riscv-elf.adoc index 95ae9fde..f02bd98a 100644 --- a/riscv-elf.adoc +++ b/riscv-elf.adoc @@ -1173,9 +1173,12 @@ A number of symbols, named mapping symbols, describe the boundaries. [%autowidth] |=== | Symbol Name | Meaning -| $d | Start of a sequence of data. -| $x | Start of a sequence of instructions. -| $x | Start of a sequence of instructions with extension. +| $d .2+| Start of a sequence of data. +| $d. +| $x .2+| Start of a sequence of instructions. +| $x. +| $x .2+| Start of a sequence of instructions with extension. +| $x. |=== The mapping symbol should set the type to `STT_NOTYPE`, binding to `STB_LOCAL`, @@ -1194,6 +1197,9 @@ from ELF attribute. Format and rule of the optional ISA string are same as `Tag_RISCV_arch`, must having explicit version, more detailed rule please refer to <>. +The mapping symbol can be followed by an optional uniquifier, which is prefixed +with a dot (`.`). + 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