https://git.reactos.org/?p=reactos.git;a=commitdiff;h=78d9c38c37e50ed2f2611…
commit 78d9c38c37e50ed2f2611c8f0a13a4587a709e2a
Author: Hervé Poussineau <hpoussin(a)reactos.org>
AuthorDate: Mon Feb 22 00:04:11 2021 +0100
Commit: Hervé Poussineau <hpoussin(a)reactos.org>
CommitDate: Mon Feb 22 00:08:28 2021 +0100
[FREELDR/x64] Change syntax to be compatible with GAS x64
---
boot/freeldr/freeldr/arch/realmode/amd64.S | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/boot/freeldr/freeldr/arch/realmode/amd64.S
b/boot/freeldr/freeldr/arch/realmode/amd64.S
index c07110c2c0e..c13c2e805e3 100644
--- a/boot/freeldr/freeldr/arch/realmode/amd64.S
+++ b/boot/freeldr/freeldr/arch/realmode/amd64.S
@@ -77,7 +77,11 @@ Msg_LongModeSupported:
call BuildPageTables
/* Store real mode entry point in shared memory */
+#ifdef _USE_ML
mov dword ptr ds:[BSS_RealModeEntry], offset RealModeEntryPoint
+#else
+ mov dword ptr ds:[BSS_RealModeEntry], (FREELDR_BASE + RealModeEntryPoint - (Startup -
512))
+#endif
/* Address the image with es segment */
mov ax, FREELDR_PE_BASE / 16
@@ -120,7 +124,11 @@ gdt:
/* GDT table pointer */
gdtptr:
.word HEX(37) /* Limit */
+#ifdef _USE_ML
.long offset gdt /* Base Address */
+#else
+ .long (FREELDR_BASE + gdt - (Startup - 512)) /* Base Address */
+#endif
CheckFor64BitSupport: