From 1083ac9baca0c8a5eb138fa6b62690ab5cb2a4d6 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 12 Jun 2016 16:32:34 +0200 Subject: [PATCH 1/2] Remove unneeded gcc_except_table section --- src/arch/x86_64/linker.ld | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/arch/x86_64/linker.ld b/src/arch/x86_64/linker.ld index ff773527..ac3014b7 100644 --- a/src/arch/x86_64/linker.ld +++ b/src/arch/x86_64/linker.ld @@ -44,9 +44,4 @@ SECTIONS { *(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*) . = ALIGN(4K); } - - .gcc_except_table : ALIGN(4K) { - *(.gcc_except_table) - . = ALIGN(4K); - } } From 1fb6369f611d7c9277675fac6c2f600a6e949e72 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 12 Jun 2016 16:33:55 +0200 Subject: [PATCH 2/2] Remove unneeded gcc_except_table section from blog post --- blog/post/2016-01-01-remap-the-kernel.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/blog/post/2016-01-01-remap-the-kernel.md b/blog/post/2016-01-01-remap-the-kernel.md index 4bca80cf..93b7316f 100644 --- a/blog/post/2016-01-01-remap-the-kernel.md +++ b/blog/post/2016-01-01-remap-the-kernel.md @@ -683,11 +683,6 @@ SECTIONS { *(.data.rel.ro.local*) *(.data.rel.ro .data.rel.ro.*) . = ALIGN(4K); } - - .gcc_except_table : ALIGN(4K) { - *(.gcc_except_table) - . = ALIGN(4K); - } } ``` Instead of page aligning the `.multiboot_header` section, we merge it into the `.rodata` section. That way, we don't waste a whole page for the few bytes of the Multiboot header. We could merge it into any section, but `.rodata` fits best because it has the same flags (neither writable nor executable). The Multiboot header still needs to be at the beginning of the file, so `.rodata` must be our first section now.