summaryrefslogtreecommitdiff
path: root/linker.ld
blob: aff67ad6d645fafba00ba2ee7d9eaba5ea1bd14e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* The bootloader will look at this image and start execution at the symbol
   designated as the entry point. */
ENTRY(_start)

/* Tell where the various sections of the object files will be put in the final
   kernel image. */
SECTIONS
{
  /* Begin putting sections at 1 MiB, a conventional place for kernels to be
     loaded at by the bootloader. */
  . = 0x7e00;

  .text : ALIGN(0x100) { *(.text) }

  .rodata : ALIGN(0x100) { *(.rodata) }

  .data : ALIGN(0x100) { *(.data) }

  .bss : ALIGN(0x100) { *(.bss) }

  /DISCARD/ : { *(*) }

  /* The compiler may produce other sections, by default it will put them in
     a segment with the same name. Simply add stuff here as needed. */
}