summaryrefslogtreecommitdiff
path: root/kc/component.ld
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2021-12-19 22:41:15 +0000
committerAda Christine <adachristine18@gmail.com>2021-12-19 22:41:15 +0000
commite303a03e7c96bc5bf7fa93f7b46ce63196893d7a (patch)
treef187b374feec85015d6df1f94db618a3f5cc893f /kc/component.ld
parentbff63a4337eb3388617d230970c5eb2684d6a215 (diff)
moving files around
Diffstat (limited to 'kc/component.ld')
-rw-r--r--kc/component.ld75
1 files changed, 75 insertions, 0 deletions
diff --git a/kc/component.ld b/kc/component.ld
new file mode 100644
index 0000000..3a48ae8
--- /dev/null
+++ b/kc/component.ld
@@ -0,0 +1,75 @@
+ENTRY(kc_entry)
+
+SECTIONS
+{
+ PROVIDE(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)
+ }
+}
+