summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2015-03-25 23:35:38 -0700
committeriximeow <me@iximeow.net>2015-09-28 03:36:28 -0700
commitd02d702daa3a3232ebdd712722d2483449eb8582 (patch)
tree6eba16ce93c00f07db3c262171af0bd6b8895910
parentee0006e83551c2bd342d84dae6b48b4fe6043d46 (diff)
fix up linker.ld to actually... work.
-rw-r--r--linker.ld31
1 files changed, 7 insertions, 24 deletions
diff --git a/linker.ld b/linker.ld
index 7486136..5fd7736 100644
--- a/linker.ld
+++ b/linker.ld
@@ -8,34 +8,17 @@ SECTIONS
{
/* Begin putting sections at 1 MiB, a conventional place for kernels to be
loaded at by the bootloader. */
- . = 10K;
+ . = 0x7e00;
- /* First put the multiboot header, as it is required to be put very early
- early in the image or the bootloader won't recognize the file format.
- Next we'll put the .text section. */
- .text BLOCK(4K) : ALIGN(4K)
- {
- *(.text)
- }
+ .text : ALIGN(0x100) { *(.text) }
- /* Read-only data. */
- .rodata BLOCK(4K) : ALIGN(4K)
- {
- *(.rodata)
- }
+ .rodata : ALIGN(0x100) { *(.rodata) }
- /* Read-write data (initialized) */
- .data BLOCK(4K) : ALIGN(4K)
- {
- *(.data)
- }
+ .data : ALIGN(0x100) { *(.data) }
- /* Read-write data (uninitialized) and stack */
- .bss BLOCK(4K) : ALIGN(4K)
- {
- *(.bss)
- *(.bootstrap_stack)
- }
+ .bss : ALIGN(0x100) { *(.bss) }
+
+ /DISCARD/ : { *(.note.gnu.build-id) }
/* 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. */