Run first app from ramdisk!
This commit is contained in:
10
amd64/flags.mk
Normal file
10
amd64/flags.mk
Normal file
@@ -0,0 +1,10 @@
|
||||
cflags += --target=x86_64-pc-none-elf \
|
||||
-mno-sse \
|
||||
-mno-sse2 \
|
||||
-mno-avx \
|
||||
-mno-mmx \
|
||||
-mno-80387 \
|
||||
-mno-red-zone
|
||||
|
||||
ldflags += --target=x86_64-pc-none-elf \
|
||||
-Wl,-zmax-page-size=0x1000
|
||||
42
amd64/link.ld
Normal file
42
amd64/link.ld
Normal file
@@ -0,0 +1,42 @@
|
||||
OUTPUT_FORMAT(elf64-x86-64)
|
||||
|
||||
ENTRY(_start)
|
||||
|
||||
PHDRS {
|
||||
text PT_LOAD;
|
||||
rodata PT_LOAD;
|
||||
data PT_LOAD;
|
||||
}
|
||||
|
||||
SECTIONS {
|
||||
. = 0x0000000050000000;
|
||||
|
||||
.text : {
|
||||
*(.text .text.*)
|
||||
} :text
|
||||
|
||||
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
||||
.rodata : {
|
||||
*(.rodata .rodata.*)
|
||||
} :rodata
|
||||
|
||||
.note.gnu.build-id : {
|
||||
*(.note.gnu.build-id)
|
||||
} :rodata
|
||||
|
||||
. = ALIGN(CONSTANT(MAXPAGESIZE));
|
||||
|
||||
.data : {
|
||||
*(.data .data.*)
|
||||
} :data
|
||||
|
||||
.bss : {
|
||||
*(.bss .bss.*)
|
||||
} :data
|
||||
|
||||
/DISCARD/ : {
|
||||
*(.eh_frame*)
|
||||
*(.note .note.*)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user