On Wed, Mar 02, 2022 at 03:35:07PM +0000, Andrew Cooper wrote: > On 02/03/2022 13:44, Roger Pau Monne wrote: > > diff --git a/xen/common/Kconfig b/xen/common/Kconfig > > index 6443943889..2423d9f490 100644 > > --- a/xen/common/Kconfig > > +++ b/xen/common/Kconfig > > @@ -353,7 +353,9 @@ config CRYPTO > > config LIVEPATCH > > bool "Live patching support" > > default X86 > > - depends on "$(XEN_HAS_BUILD_ID)" = "y" > > + depends on "$(XEN_HAS_BUILD_ID)" = "y" && \ > > + $(cc-option,-ffunction-sections) && \ > > + $(cc-option,-fdata-sections) > > cc-option can take multiple, so just $(cc-option,-ffunction-sections > -fdata-sections) > > However, we in practice want these in combination with $(LD) > --gc-sections anyway although that wants to be separately configurable. > > Therefore, we probably want something like: > > config FUNC_SECTIONS > bool > > config LIVEPATCH > selects FUNC_SECTIONS > > or so, so in the future we can add "config LD_GC_SECTIONS" which also > selects FUNC_SECTIONS. > > Thoughts?
Do we want separate options for ffunction-sections and fdata-sections options, or is FUNC_SECTIONS supposed to cover them both? I assume you are fine with Jan's suggestion to not check for the option presence, since it should be in all supported versions. Thanks, Roger.
