summaryrefslogtreecommitdiff
path: root/arch/alpha/boot/compressed/vmlinux.lds.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/boot/compressed/vmlinux.lds.S')
-rw-r--r--arch/alpha/boot/compressed/vmlinux.lds.S83
1 files changed, 83 insertions, 0 deletions
diff --git a/arch/alpha/boot/compressed/vmlinux.lds.S b/arch/alpha/boot/compressed/vmlinux.lds.S
new file mode 100644
index 000000000..5328c1cca
--- /dev/null
+++ b/arch/alpha/boot/compressed/vmlinux.lds.S
@@ -0,0 +1,83 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#include <asm-generic/vmlinux.lds.h>
+#include <asm/page.h>
+#include <asm/setup.h>
+
+OUTPUT_FORMAT("elf64-alpha")
+OUTPUT_ARCH(alpha)
+ENTRY(__start)
+
+SECTIONS
+{
+ /*
+ * Link the stub at the address the real, uncompressed vmlinux has
+ * always occupied. aboot derives the OSF/1 parameter-page
+ * (ZERO_PGE) and initial stack (INIT_STACK) addresses from the
+ * loaded image's own p_vaddr, so a stub linked anywhere else would
+ * hand the real kernel a parameter page it does not expect.
+ */
+ . = START_ADDR;
+
+ .head.text : {
+ _head = .;
+ HEAD_TEXT
+ _ehead = .;
+ }
+
+ . = ALIGN(8);
+ .rodata.compressed : {
+ *(.rodata.compressed)
+ }
+
+ . = ALIGN(PAGE_SIZE);
+ .text : {
+ _text = .;
+ *(.text)
+ *(.text.*)
+ _etext = .;
+ }
+ . = ALIGN(8);
+ .rodata : {
+ *(.rodata)
+ *(.rodata.*)
+ }
+ . = ALIGN(8);
+ .data : {
+ *(.data)
+ *(.data.*)
+ }
+ .got : {
+ *(.got)
+ }
+ .sdata : {
+ *(.sdata)
+ }
+ /*
+ * misc.c decompresses to _ebss, so nothing that the stub still
+ * needs may be placed after .bss. --orphan-handling=warn keeps a
+ * new section from silently landing there.
+ */
+ . = ALIGN(8);
+ .bss : {
+ _bss = .;
+ *(.sbss)
+ *(.scommon)
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ . = ALIGN(8);
+ _ebss = .;
+ }
+
+ STABS_DEBUG
+ DWARF_DEBUG
+ ELF_DETAILS
+
+ DISCARDS
+ /DISCARD/ : {
+ *(.eh_frame)
+ *(.modinfo)
+ *(.note)
+ *(.note.*)
+ }
+}