RE: [PATCH 6/6] x86/gsseg: use the LKGS instruction if available for load_gs_index()

From: Li, Xin3
Date: Fri Oct 14 2022 - 00:37:41 EST


> > Andrew Cooper suggested upgrading the orphan section warning to a hard
> > link error, orphan sections are bad regardless.
> >
>
> Agreed 1000%. This is a no-brainer. From IRC:
>
>
> <andyhhp> -LDFLAGS_vmlinux += --orphan-handling=warn
> <andyhhp> +LDFLAGS_vmlinux += --orphan-handling=error

There is an arch independent config CONFIG_LD_ORPHAN_WARN, which forces linker
to warn on implicit named sections, or there is even no warning.

CONFIG_LD_ORPHAN_WARN depends on ARCH_WANT_LD_ORPHAN_WARN, and some archs
(arm/arm64/mips/x86/...) have it defined, and then ld generates warnings on
orphan sections.

Should we promote warning to error only on x86?

>
> -hpa