[PATCH v3 02/15] riscv: Use _stext not _text to denote the start of kernel code

Jason Gunthorpe jgg at nvidia.com
Mon Nov 16 10:52:15 PST 2026


On Mon, 16 Nov 2026 15:26:21 +0100, Ard Biesheuvel <ardb+git at google.com> wrote:
> On RISC-V, _text and _stext currently refer to the same location, i.e.,
> the start of the .text output section, which follows the image header
> (.head.text) emitted by HEAD_TEXT_SECTION. _start is the symbol that
> refers to the actual start of the image.
> 
> On other architectures such as arm64, _text refers to the start of the
> image, and _stext to the start of the kernel code, and generic code
> (such as the EFI stub) may start relying on this distinction.
> 
> [...]

Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>

-- 
Jason



More information about the linux-riscv mailing list