summaryrefslogtreecommitdiffstats
path: root/skiboot.lds.S
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-02 15:36:20 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-02 15:36:20 +1000
commit1d880992fd8c8457a2d990ac6622cfd58fb1b261 (patch)
treec4c843b12e96b5612c315db5a23c5da1a900618c /skiboot.lds.S
downloadblackbird-skiboot-1d880992fd8c8457a2d990ac6622cfd58fb1b261.tar.gz
blackbird-skiboot-1d880992fd8c8457a2d990ac6622cfd58fb1b261.zip
Initial commit of Open Source release
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'skiboot.lds.S')
-rw-r--r--skiboot.lds.S143
1 files changed, 143 insertions, 0 deletions
diff --git a/skiboot.lds.S b/skiboot.lds.S
new file mode 100644
index 00000000..cbc8b85b
--- /dev/null
+++ b/skiboot.lds.S
@@ -0,0 +1,143 @@
+/* Copyright 2013-2014 IBM Corp.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <config.h>
+#include <mem-map.h>
+
+ENTRY(boot_entry);
+SECTIONS
+{
+ . = 0;
+
+ .head : {
+ KEEP(*(.head))
+ }
+
+ . = SPIRA_OFF;
+ .spira : {
+ KEEP(*(.spira.data))
+ }
+
+ . = PROCIN_OFF;
+ .procin.data : {
+ KEEP(*(.procin.data))
+ }
+
+ . = MDST_TABLE_OFF;
+ .mdst : {
+ KEEP(*(.mdst.data))
+ }
+
+ . = ALIGN(0x10);
+ .text : {
+ *(.text*)
+ *(.sfpr)
+ }
+
+ .rodata : {
+ __rodata_start = .;
+ *(.rodata .rodata.*)
+ __rodata_end = .;
+ }
+
+ .data : {
+ /*
+ * A couple of things that need to be 4K aligned and
+ * to reside in their own pages for the sake of TCE
+ * mappings
+ */
+ . = ALIGN(0x1000);
+ *(.data.memcons);
+ . = ALIGN(0x1000);
+ *(.data.boot_trace);
+ . = ALIGN(0x1000);
+ *(.data*)
+ *(.force.data)
+ *(.toc1)
+ *(.branch_lt)
+ }
+
+ . = ALIGN(0x10);
+ .opd : {
+ *(.opd)
+ }
+
+ . = ALIGN(0x10);
+ .got : {
+ __toc_start = . + 0x8000;
+ *(.got)
+ *(.toc)
+ }
+
+ . = ALIGN(0x10);
+ .opal_table : {
+ __opal_table_start = .;
+ KEEP(*(.opal_table))
+ __opal_table_end = .;
+ }
+
+ .platforms : {
+ __platforms_start = .;
+ KEEP(*(.platforms))
+ __platforms_end = .;
+ }
+
+ /* Do I need to keep these ? */
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+
+ /* Relocations */
+ . = ALIGN(0x10);
+ .dynamic : {
+ __dynamic_start = .;
+ *(.dynamic)
+ __dynamic_end = .;
+ }
+
+ . = ALIGN(0x10);
+ .rela.dyn : {
+ __rela_dyn_start = .;
+ *(.rela*)
+ __rela_dyn_end = .;
+ }
+
+ .hash : { *(.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+
+ . = ALIGN(0x1000);
+ _sbss = .;
+ .bss : {
+ *(.bss*)
+ }
+ . = ALIGN(0x10000);
+ _ebss = .;
+ _end = .;
+
+ /* Optional kernel image */
+ . = ALIGN(0x10000);
+ .builtin_kernel : {
+ __builtin_kernel_start = .;
+ KEEP(*(.builtin_kernel))
+ __builtin_kernel_end = .;
+ }
+
+ /* Discards */
+ /DISCARD/ : {
+ *(.comment)
+ *(.interp)
+ }
+}
OpenPOWER on IntegriCloud