linker.ld: Work around portability issue
This commit is contained in:
parent
3a71b67038
commit
1929fda490
2 changed files with 7 additions and 4 deletions
|
@ -42,7 +42,7 @@ override INTERNALLDFLAGS := \
|
||||||
-nostdlib \
|
-nostdlib \
|
||||||
-static \
|
-static \
|
||||||
-Wl,-z,max-page-size=0x1000 \
|
-Wl,-z,max-page-size=0x1000 \
|
||||||
-Wl,-T,linker.ld
|
-Wl,-T,linker-$(ARCH).ld
|
||||||
|
|
||||||
# Set archtecture specific variables (and check that the architecture is supported).
|
# Set archtecture specific variables (and check that the architecture is supported).
|
||||||
ifeq ($(ARCH),x86_64)
|
ifeq ($(ARCH),x86_64)
|
||||||
|
@ -57,8 +57,7 @@ ifeq ($(ARCH),x86_64)
|
||||||
-mno-red-zone \
|
-mno-red-zone \
|
||||||
-mcmodel=kernel
|
-mcmodel=kernel
|
||||||
override INTERNALLDFLAGS += \
|
override INTERNALLDFLAGS += \
|
||||||
-Wl,-m,elf_x86_64 \
|
-Wl,-m,elf_x86_64
|
||||||
-Wl,--oformat=elf64-x86-64
|
|
||||||
else
|
else
|
||||||
$(error Architecture $(ARCH) not supported)
|
$(error Architecture $(ARCH) not supported)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
/* Tell the linker that we want an x86_64 ELF64 output file */
|
||||||
|
OUTPUT_FORMAT(elf64-x86-64)
|
||||||
|
OUTPUT_ARCH(i386:x86-64)
|
||||||
|
|
||||||
/* We want the symbol _start to be our entry point */
|
/* We want the symbol _start to be our entry point */
|
||||||
ENTRY(_start)
|
ENTRY(_start)
|
||||||
|
|
Loading…
Add table
Reference in a new issue