Make it work

This commit is contained in:
mintsuki 2021-03-02 19:11:34 +01:00
parent 7d8758d643
commit 0ec053710c
3 changed files with 21 additions and 12 deletions

View File

@ -21,6 +21,7 @@
#include <pxe/tftp.h> #include <pxe/tftp.h>
#if defined (uefi) #if defined (uefi)
__attribute__((ms_abi))
EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
(void)ImageHandle; (void)ImageHandle;
@ -28,6 +29,8 @@ EFI_STATUS efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
gBS = SystemTable->BootServices; gBS = SystemTable->BootServices;
gRT = SystemTable->RuntimeServices; gRT = SystemTable->RuntimeServices;
print("hello world\n");
for (;;); for (;;);
} }
#endif #endif

View File

@ -7,19 +7,16 @@ SECTIONS
.text : { .text : {
*(.text*) *(.text*)
}
.data : {
*(.realmode*) *(.realmode*)
*(.data*)
} }
.rodata : { .rodata : {
limine_map = .;
*(.rodata*) *(.rodata*)
} }
.map : { .data : {
limine_map = .; *(.data*)
} }
.bss : { .bss : {
@ -27,6 +24,12 @@ SECTIONS
*(.bss*) *(.bss*)
} }
.reloc : {
LONG(0);
LONG(10);
SHORT(0);
}
/DISCARD/ : { /DISCARD/ : {
*(*) *(*)
} }

View File

@ -7,19 +7,16 @@ SECTIONS
.text : { .text : {
*(.text*) *(.text*)
}
.data : {
*(.realmode*) *(.realmode*)
*(.data*)
} }
.rodata : { .rodata : {
*(.map*)
*(.rodata*) *(.rodata*)
} }
.map : { .data : {
*(.map*) *(.data*)
} }
.bss : { .bss : {
@ -27,6 +24,12 @@ SECTIONS
*(.bss*) *(.bss*)
} }
.reloc : {
LONG(0);
LONG(10);
SHORT(0);
}
/DISCARD/ : { /DISCARD/ : {
*(*) *(*)
} }