On 02.03.2022 15:41, Jan Beulich wrote: > On 02.03.2022 14:44, Roger Pau Monne wrote: >> --- a/xen/arch/x86/xen.lds.S >> +++ b/xen/arch/x86/xen.lds.S >> @@ -88,6 +88,9 @@ SECTIONS >> >> *(.text.cold) >> *(.text.unlikely) >> +#ifdef CONFIG_LIVEPATCH >> + *(.text.*) >> +#endif > > This coming after the "cold" and "unlikely" special sections and > ahead of .fixup isn't very nice. Also from looking at the linker > scripts ld supplies I'm getting the impression that there could/ > would then also be e.g. .text.cold.* and .text.unlikely.* which > you'd want to separate.
Thinking about it, with -ffunction-sections startup code cannot reasonably be placed in .text.startup, or else there would be confusion with code originating from a function named startup(). But of course .text.startup.* is similarly difficult to arrange for not ending up in the output's main .text, so adding .text.startup.* and .text.exit.* later in the script wouldn't gain us anything. Jan
