From: Anthony PERARD <anthony@xenproject.org>
To: Jason Andryuk <jason.andryuk@amd.com>
Cc: xen-devel@lists.xenproject.org,
"Victor Lira" <victorm.lira@amd.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Timothy Pearson" <tpearson@raptorengineering.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Bob Eshleman" <bobbyeshleman@gmail.com>,
"Connor Davis" <connojdavis@gmail.com>,
"Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
"Grygorii Strashko" <grygorii_strashko@epam.com>
Subject: Re: [PATCH 2/2] xen: Add CONFIG_GC_SECTIONS
Date: Wed, 10 Dec 2025 15:40:13 +0100 [thread overview]
Message-ID: <aTmGTWIO2ZKWuQeu@l14> (raw)
In-Reply-To: <20251209214728.278949-3-jason.andryuk@amd.com>
On Tue, Dec 09, 2025 at 04:47:28PM -0500, Jason Andryuk wrote:
> diff --git a/xen/Makefile b/xen/Makefile
> index e6cf287425..aeb5dcf2ee 100644
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -469,10 +469,13 @@ all-symbols-$(CONFIG_FAST_SYMBOL_LOOKUP) += --sort-by-name
>
> include $(srctree)/arch/$(SRCARCH)/arch.mk
>
> +XEN_FINAL_LDFLAGS-$(CONFIG_GC_SECTIONS) := --gc-sections
Is there a good reason to add this flags after the arch-specific
makefiles? If not, could you move that just before, and right after the
definition of "$(all-symbols)" as it's a variable that is used in the
same phase of the build. (With Jan's other feedback)
> # define new variables to avoid the ones defined in Config.mk
> export XEN_CFLAGS := $(CFLAGS)
> export XEN_AFLAGS := $(AFLAGS)
> export XEN_LDFLAGS := $(LDFLAGS)
> +export XEN_FINAL_LDFLAGS := $(LDFLAGS) $(XEN_FINAL_LDFLAGS-y)
"FINAL" isn't very descriptive. A completely wrong interpretation might
be that we should use the "final" variable instead of "XEN_LDFLAGS". How
about a name that describe where this set of flags is going to be used,
like "XEN_LDFLAGS_xen_syms" (which unfortunately doesn't exactly fit
with x86 xen.efi target), or maybe suffix it with "_target" or just
"_xen"? (In Linux build system, they use "LDFLAGS_vmlinux", but I don't
know what would be the equivalent of "vmlinux" in our build system.)
The prefix "XEN_" is used as namespace, with one reason described in the
comment.
Also, could you use $(XEN_LDFLAGS) instead of $(LDFLAGS) ?
Cheers,
--
Anthony PERARD
next prev parent reply other threads:[~2025-12-10 14:40 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-09 21:47 [PATCH 0/2] Enable --gc-sections Jason Andryuk
2025-12-09 21:47 ` [PATCH 1/2] xen: Centralize scheduler linker definition Jason Andryuk
2025-12-10 8:08 ` Jan Beulich
2025-12-10 16:32 ` Andrew Cooper
2025-12-10 16:49 ` Jason Andryuk
2025-12-09 21:47 ` [PATCH 2/2] xen: Add CONFIG_GC_SECTIONS Jason Andryuk
2025-12-10 8:17 ` Jan Beulich
2025-12-10 16:57 ` Jason Andryuk
2025-12-11 8:20 ` Jan Beulich
2025-12-10 14:40 ` Anthony PERARD [this message]
2025-12-10 17:08 ` Jason Andryuk
2025-12-11 8:23 ` Jan Beulich
2025-12-10 16:55 ` KEEP " Andrew Cooper
2025-12-10 17:11 ` Jason Andryuk
2025-12-11 1:28 ` Jason Andryuk
2025-12-11 1:53 ` Jason Andryuk
2025-12-11 2:47 ` Andrew Cooper
2025-12-11 8:29 ` Jan Beulich
2025-12-12 1:34 ` Jason Andryuk
2025-12-12 13:22 ` Jan Beulich
2025-12-12 15:48 ` Jason Andryuk
2025-12-15 8:59 ` Jan Beulich
2026-01-09 23:32 ` Jason Andryuk
2026-01-12 10:37 ` Jan Beulich
2025-12-12 15:39 ` Jason Andryuk
2025-12-11 8:27 ` Jan Beulich
2025-12-12 10:42 ` Grygorii Strashko
2025-12-12 15:54 ` Jason Andryuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aTmGTWIO2ZKWuQeu@l14 \
--to=anthony@xenproject.org \
--cc=Volodymyr_Babchuk@epam.com \
--cc=alistair.francis@wdc.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=bertrand.marquis@arm.com \
--cc=bobbyeshleman@gmail.com \
--cc=connojdavis@gmail.com \
--cc=grygorii_strashko@epam.com \
--cc=jason.andryuk@amd.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=oleksii.kurochko@gmail.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=tpearson@raptorengineering.com \
--cc=victorm.lira@amd.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.