Re: [PATCH v9 05/15] x86: support ASM function sections

Borislav Petkov
2022-01-21T15:08:38Z

On Thu, Dec 23, 2021 at 01:21:59AM +0100, Alexander Lobakin wrote:
> Address places which need special care and enable
> CONFIG_ARCH_SUPPORTS_ASM_FUNCTION_SECTIONS.
>
> Notably:
> - propagate --sectname-subst to aflags in x86/boot/Makefile and
> x86/boot/compressed/Makefile as both override aflags;

s/aflags/KBUILD_AFLAGS/

Let's be more precise pls.

> - symbols starting with a dot (like ".Lbad_gs") should be handled
> manually with SYM_*_START_SECT(.Lbad_gs, bad_gs) as "two dots"
> is a special (and CPP doesn't want to concatenate two dots in
> general);
> - some symbols explicitly need to reside in one section (like
> kexec control code, hibernation page etc.);
> - macros creating aliases for functions (like __memcpy() for
> memcpy() etc.) should go after the main declaration (as
> aliases should be declared in the same section and they
> don't have SYM_PUSH_SECTION() inside);
> - things like ".org", ".align" should be manually pushed to
> the same section the next symbol goes to;
> - expand indirect_thunk and .fixup wildcards in vmlinux.lds.S

$ git grep -E "\.fixup" arch/x86/*.S
$

I guess I'll continue with your new version since a bunch of stuff
has changed in arch/x86/ in the meantime so that that set would need
refreshing.

Thx.

--
Regards/Gruss,
Boris.