aboutsummaryrefslogtreecommitdiff
path: root/model.lds.S
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-12-02 12:26:48 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2012-09-12 14:20:41 +0100
commit26b62f586020fd998c6efd43db657eaafeec14da (patch)
treeec0dd0ff281ba47614baec4d496e581c7b9e0c89 /model.lds.S
Initial version of the AArch64 Linux boot wrapperubuntu
This boot wrapper contains the code for initialising the ARMv8 software model before the Linux kernel can run (see Documentation/arm64/booting.txt in the kernel tree for the Linux booting requirements). Running "make" creates a "linux-system.axf" ELF file that can be loaded by the software model. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'model.lds.S')
-rw-r--r--model.lds.S45
1 files changed, 45 insertions, 0 deletions
diff --git a/model.lds.S b/model.lds.S
new file mode 100644
index 0000000..ec27433
--- /dev/null
+++ b/model.lds.S
@@ -0,0 +1,45 @@
+/*
+ * model.lds.S - simple linker script for stand-alone Linux booting
+ *
+ * Copyright (C) 2012 ARM Limited. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE.txt file.
+ */
+
+OUTPUT_FORMAT("elf64-littleaarch64")
+OUTPUT_ARCH(aarch64)
+TARGET(binary)
+
+INPUT(./boot.o)
+INPUT(KERNEL)
+INPUT(./fdt.dtb)
+
+#ifdef USE_INITRD
+INPUT(FILESYSTEM)
+#endif
+
+SECTIONS
+{
+ . = PHYS_OFFSET;
+ .text : { boot.o }
+ . = PHYS_OFFSET + MBOX_OFFSET;
+ mbox = .;
+ .mbox : { QUAD(0x0) }
+ . = PHYS_OFFSET + KERNEL_OFFSET;
+ kernel = .;
+ .kernel : { KERNEL }
+
+ . = PHYS_OFFSET + FDT_OFFSET;
+ dtb = .;
+ .dtb : { ./fdt.dtb }
+ . = PHYS_OFFSET + FS_OFFSET;
+ filesystem = .;
+#ifdef USE_INITRD
+ .filesystem : { FILESYSTEM }
+ fs_size = . - filesystem;
+#endif
+
+ .data : { *(.data) }
+ .bss : { *(.bss) }
+}