diff options
| author | Ada Christine <adachristine18@gmail.com> | 2021-12-19 01:16:51 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2021-12-19 01:16:51 +0000 |
| commit | bff63a4337eb3388617d230970c5eb2684d6a215 (patch) | |
| tree | f40891f45918b23dac0f31888142136434c7fc8c /lib/component.ld | |
| parent | d5f485a4f6801f58cbb2bc9d8e80c955c79ff044 (diff) | |
i don't know what i'm doing anymore
Diffstat (limited to 'lib/component.ld')
| -rw-r--r-- | lib/component.ld | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/lib/component.ld b/lib/component.ld new file mode 100644 index 0000000..3a48ae8 --- /dev/null +++ b/lib/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) + } +} + |
