From 201f84c20afedec7ef3a6d2e54544f055241f923 Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Fri, 20 Oct 2017 22:04:42 +0100 Subject: [PATCH] Added linker.ld --- linker.ld | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 linker.ld diff --git a/linker.ld b/linker.ld new file mode 100644 index 0000000..32182c7 --- /dev/null +++ b/linker.ld @@ -0,0 +1,32 @@ +OUTPUT_FORMAT(elf32-i386) +ENTRY (start) + +SECTIONS{ + . = 0x00100000; + + .text :{ + code = .; _code = .; __code = .; + *(.text) + *(.rodata) + } + + .rodata ALIGN (0x1000) : { + *(.rodata) + } + + .data ALIGN (0x1000) : { + data = .; _data = .; __data = .; + *(.data) + start_ctors = .; *(.ctors) end_ctors = .; + start_dtors = .; *(.dtors) end_dtors = .; + } + + .bss : { + sbss = .; + bss = .; _bss = .; __bss = .; + *(COMMON) + *(.bss) + ebss = .; + } + end = .; _end = .; __end = .; +}