[llvm] [AsmPrinter][ELF] Support profile-guided section prefix for jump tables' (read-only) data sections (PR #122215)

Haohai Wen via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 24 02:34:21 PST 2025


HaohaiWen wrote:

> When this patch is enabled, linker will see {.rodata, .rodata.hot, .rodata.unlikely} in input sections. It can map .rodata.hot and .rodata in the input sections to .rodata.hot in the executable, and map .rodata.unlikely into .rodata with a pending extension to --keep-text-section-prefix like https://github.com/llvm/llvm-project/commit/059e7cbb66a30ce35f3ee43197eed1a106b50c5b, or with a linker script.
I think .rodata.hot and .rodata.unlikely will be mapped to .rodata by default.
https://github.com/llvm/llvm-project/blob/9bb3c62948d0c6dd3fb233186ae6a79744012b8f/lld/ELF/LinkerScript.cpp#L108


https://github.com/llvm/llvm-project/pull/122215


More information about the llvm-commits mailing list