]> xenbits.xensource.com Git - xen.git/commitdiff
x86/boot: Fix intermediate file names to generate 32 bit code
authorFrediano Ziglio <frediano.ziglio@cloud.com>
Wed, 6 Nov 2024 10:07:48 +0000 (10:07 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 6 Nov 2024 13:47:23 +0000 (13:47 +0000)
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>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/boot/Makefile
xen/arch/x86/boot/build32.lds.S

index e102bd8c70d8530d65532420ac6e915ac4d110ab..5f832c5896f42672df0b985fb4456760a394dd54 100644 (file)
@@ -44,7 +44,7 @@ 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 +75,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    $@
 
index f20fc1897712673ad9144b0965ca0ca0607656b6..9b29f0184fb8480839daf6b409f20ca1082914c4 100644 (file)
@@ -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