diff --git a/kernel/GNUmakefile b/kernel/GNUmakefile index 1d31c8c..79ca744 100644 --- a/kernel/GNUmakefile +++ b/kernel/GNUmakefile @@ -23,15 +23,15 @@ $(eval $(call DEFAULT_VAR,LD,ld)) # User controllable CFLAGS. CFLAGS ?= -O2 -g -Wall -Wextra -Wpedantic -pipe +# User controllable preprocessor flags. We set none by default. +CPPFLAGS ?= + # User controllable nasm flags. NASMFLAGS ?= -F dwarf -g # User controllable linker flags. We set none by default. LDFLAGS ?= -# User controllable preprocessor flags. We set none by default. -CPPFLAGS ?= - # Internal C flags that should not be changed by the user. override CFLAGS += \ -I. \ diff --git a/kernel/linker.ld b/kernel/linker.ld index e9e1afa..3645258 100644 --- a/kernel/linker.ld +++ b/kernel/linker.ld @@ -45,8 +45,9 @@ SECTIONS *(.bss .bss.*) } :data - /* Discard notes since they may cause issues on some hosts. */ + /* Discard .note.* and .eh_frame since they may cause issues on some hosts. */ /DISCARD/ : { + *(.eh_frame) *(.note .note.*) } }