summaryrefslogtreecommitdiff
path: root/kc/kc.ld
diff options
context:
space:
mode:
Diffstat (limited to 'kc/kc.ld')
-rw-r--r--kc/kc.ld75
1 files changed, 75 insertions, 0 deletions
diff --git a/kc/kc.ld b/kc/kc.ld
new file mode 100644
index 0000000..dc158f3
--- /dev/null
+++ b/kc/kc.ld
@@ -0,0 +1,75 @@
+ENTRY(kc_entry)
+
+SECTIONS
+{
+ PROVIDE_HIDDEN(kc_image_base = .);
+
+ . = sizeof_headers;
+
+ .rel :
+ {
+ *(.rel)
+ *(.rel.*)
+ }
+
+ .rela :
+ {
+ *(.rel)
+ *(.rela.*)
+ }
+
+ .hash :
+ {
+ *(.hash)
+ }
+
+ .dynsym :
+ {
+ *(.dynsym)
+ }
+
+ .dynstr :
+ {
+ *(.dynstr)
+ }
+
+ .text : ALIGN(4K)
+ {
+ PROVIDE(kc_text_begin = .);
+ *(.text.start)
+ *(.text)
+ . = ALIGN(4K);
+ PROVIDE(kc_text_end = .);
+ } =0xcc
+
+ .dynamic : ALIGN(4K)
+ {
+ *(.dynamic)
+ }
+
+ .data :
+ {
+ PROVIDE(kc_data_begin = .);
+ *(.rodata)
+ *(.data)
+ }
+
+ .data.rel :
+ {
+ *(.data.rel)
+ *(.data.rel.*)
+ }
+
+ .bss :
+ {
+ *(.bss)
+ PROVIDE(kc_data_end = .);
+ }
+
+ /DISCARD/ :
+ {
+ *(.eh_frame)
+ *(.comment)
+ }
+}
+