Make it work
diff --git a/stage23/entry.s3.c b/stage23/entry.s3.c
index ef581180..04816df8 100644
--- a/stage23/entry.s3.c
+++ b/stage23/entry.s3.c
@@ -21,6 +21,7 @@
#include <pxe/tftp.h>
#if defined (uefi)
+__attribute__((ms_abi))
EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
(void)ImageHandle;
@@ -28,6 +29,8 @@ EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
gBS = SystemTable->BootServices;
gRT = SystemTable->RuntimeServices;
+ print("hello world\n");
+
for (;;);
}
#endif
diff --git a/stage23/linker_nomap_uefi.ld b/stage23/linker_nomap_uefi.ld
index 16e400d2..2546559f 100644
--- a/stage23/linker_nomap_uefi.ld
+++ b/stage23/linker_nomap_uefi.ld
@@ -7,19 +7,16 @@ SECTIONS
.text : {
*(.text*)
- }
-
- .data : {
*(.realmode*)
- *(.data*)
}
.rodata : {
+ limine_map = .;
*(.rodata*)
}
- .map : {
- limine_map = .;
+ .data : {
+ *(.data*)
}
.bss : {
@@ -27,6 +24,12 @@ SECTIONS
*(.bss*)
}
+ .reloc : {
+ LONG(0);
+ LONG(10);
+ SHORT(0);
+ }
+
/DISCARD/ : {
*(*)
}
diff --git a/stage23/linker_uefi.ld b/stage23/linker_uefi.ld
index 283366d4..6e7b0e01 100644
--- a/stage23/linker_uefi.ld
+++ b/stage23/linker_uefi.ld
@@ -7,19 +7,16 @@ SECTIONS
.text : {
*(.text*)
- }
-
- .data : {
*(.realmode*)
- *(.data*)
}
.rodata : {
+ *(.map*)
*(.rodata*)
}
- .map : {
- *(.map*)
+ .data : {
+ *(.data*)
}
.bss : {
@@ -27,6 +24,12 @@ SECTIONS
*(.bss*)
}
+ .reloc : {
+ LONG(0);
+ LONG(10);
+ SHORT(0);
+ }
+
/DISCARD/ : {
*(*)
}
