From: Frediano Ziglio <frediano.ziglio@cloud.com>
To: xen-devel@lists.xenproject.org
Cc: "Frediano Ziglio" <frediano.ziglio@cloud.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH v2 1/3] x86/boot: Fix intermediate file names to generate 32 bit code
Date: Wed, 6 Nov 2024 11:41:48 +0000 [thread overview]
Message-ID: <20241106114150.1432512-2-frediano.ziglio@cloud.com> (raw)
In-Reply-To: <20241106114150.1432512-1-frediano.ziglio@cloud.com>
The "base" and "offset" definition were inverted, "base" file
should be the files without offsets applied while "offset" should
have the offsets applied.
Also update an old usage of "final" to "apply offset" to make
more clear and consistent (in former commit messages the "final"
term was used instead of "offset").
Fixes: aa9045e77130 ('x86/boot: Rework how 32bit C is linked/included for early boot')
Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
--
Anthony was right, it was the opposite
---
xen/arch/x86/boot/Makefile | 7 ++++---
xen/arch/x86/boot/build32.lds.S | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile
index e102bd8c70..777b4befeb 100644
--- a/xen/arch/x86/boot/Makefile
+++ b/xen/arch/x86/boot/Makefile
@@ -44,7 +44,8 @@ text_gap := 0x010200
text_diff := 0x408020
$(obj)/build32.base.lds: AFLAGS-y += -DGAP=$(text_gap) -DTEXT_DIFF=$(text_diff)
-$(obj)/build32.offset.lds: AFLAGS-y += -DGAP=$(text_gap) -DTEXT_DIFF=$(text_diff) -DFINAL
+$(obj)/build32.offset.lds: AFLAGS-y += -DGAP=$(text_gap) -DTEXT_DIFF=$(text_diff) \
+ -DAPPLY_OFFSET
$(obj)/build32.base.lds $(obj)/build32.offset.lds: $(src)/build32.lds.S FORCE
$(call if_changed_dep,cpp_lds_S)
@@ -75,10 +76,10 @@ cmd_combine = \
$(PYTHON) $(srctree)/tools/combine_two_binaries.py \
--gap $(text_gap) \
--text-diff $(text_diff) \
- --script $(obj)/build32.offset.lds \
+ --script $(obj)/build32.base.lds \
--bin1 $(obj)/built-in-32.base.bin \
--bin2 $(obj)/built-in-32.offset.bin \
- --map $(obj)/built-in-32.offset.map \
+ --map $(obj)/built-in-32.base.map \
--exports cmdline_parse_early,reloc,reloc_trampoline32 \
--output $@
diff --git a/xen/arch/x86/boot/build32.lds.S b/xen/arch/x86/boot/build32.lds.S
index f20fc18977..9b29f0184f 100644
--- a/xen/arch/x86/boot/build32.lds.S
+++ b/xen/arch/x86/boot/build32.lds.S
@@ -15,7 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef FINAL
+#ifndef APPLY_OFFSET
# undef GAP
# define GAP 0
# define MULT 0
--
2.34.1
next prev parent reply other threads:[~2024-11-06 11:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 11:41 [PATCH v2 0/3] x86/boot: Fix build with LLVM toolchain Frediano Ziglio
2024-11-06 11:41 ` Frediano Ziglio [this message]
2024-11-06 11:48 ` [PATCH v2 1/3] x86/boot: Fix intermediate file names to generate 32 bit code Andrew Cooper
2024-11-06 11:41 ` [PATCH v2 2/3] x86/boot: Uses nm command instead of map file to get symbols Frediano Ziglio
2024-11-06 12:10 ` Andrew Cooper
2024-11-06 11:41 ` [PATCH v2 3/3] x86/boot: Fix build with LLVM toolchain Frediano Ziglio
2024-11-06 12:23 ` Andrew Cooper
2024-11-07 9:36 ` Jan Beulich
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=20241106114150.1432512-2-frediano.ziglio@cloud.com \
--to=frediano.ziglio@cloud.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.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.