add 64bit version of link.ld
This commit is contained in:
parent
07a981a028
commit
83bd8ea677
3 changed files with 30 additions and 1 deletions
|
@ -43,7 +43,7 @@ CFLAGS = -g -m32 -march=i586 -Wall -O2 -fno-builtin -fstrength-reduce -fomit-fra
|
|||
# Compiler options for debuging
|
||||
#CFLAGS = -g -O -m32 -march=i586 -Wall -fno-builtin -DWITH_FRAME_POINTER -nostdinc $(INCLUDE) $(STACKPROT)
|
||||
ARFLAGS = rsv
|
||||
LDFLAGS = -T link.ld -z max-page-size=4096 --defsym __BUILD_DATE=$(shell date +'%Y%m%d') --defsym __BUILD_TIME=$(shell date +'%H%M%S')
|
||||
LDFLAGS = -T link$(BIT).ld -z max-page-size=4096 --defsym __BUILD_DATE=$(shell date +'%Y%m%d') --defsym __BUILD_TIME=$(shell date +'%H%M%S')
|
||||
STRIP_DEBUG = --strip-debug
|
||||
KEEP_DEBUG = --only-keep-debug
|
||||
CFLAGS_FOR_NEWLIB = -m32 -march=i586 -O2 $(STACKPROT)
|
||||
|
|
29
link64.ld
Normal file
29
link64.ld
Normal file
|
@ -0,0 +1,29 @@
|
|||
OUTPUT_FORMAT("elf64-x86-64")
|
||||
OUTPUT_ARCH("i386:x86-64")
|
||||
ENTRY(start)
|
||||
phys = 0x000000100000;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
kernel_start = phys;
|
||||
.mboot phys : AT(ADDR(.mboot)) {
|
||||
*(.mboot)
|
||||
*(.kmsg)
|
||||
}
|
||||
.text ALIGN(4096) : AT(ADDR(.text)) {
|
||||
*(.text)
|
||||
}
|
||||
.rodata ALIGN(4096) : AT(ADDR(.rodata)) {
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
}
|
||||
.data ALIGN(4096) : AT(ADDR(.data)) {
|
||||
*(.data)
|
||||
}
|
||||
bss_start = .;
|
||||
.bss ALIGN(4096) : AT(ADDR(.bss)) {
|
||||
*(.bss)
|
||||
}
|
||||
bss_end = .;
|
||||
kernel_end = .;
|
||||
}
|
Loading…
Add table
Reference in a new issue