diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2023-10-10 16:04:31 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2023-10-10 16:04:31 +0200 |
| commit | 88a2b78266a99ed88c7665f30528c2ce1f1bb679 (patch) | |
| tree | 436c8f919377390698df621bbb6155252e9a686c /source | |
| parent | d7b0e02bc87bbc2ab21a4f03b7a5c5cf22e89f0e (diff) | |
| download | teachos-88a2b78266a99ed88c7665f30528c2ce1f1bb679.tar.xz teachos-88a2b78266a99ed88c7665f30528c2ce1f1bb679.zip | |
x86_64: fix linker script for data section
Diffstat (limited to 'source')
| -rw-r--r-- | source/cmake/Platforms/x86_64.cmake | 2 | ||||
| -rw-r--r-- | source/kernel/arch/x86_64/kern.ld | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/cmake/Platforms/x86_64.cmake b/source/cmake/Platforms/x86_64.cmake index 14841ec..3bf4e64 100644 --- a/source/cmake/Platforms/x86_64.cmake +++ b/source/cmake/Platforms/x86_64.cmake @@ -11,7 +11,7 @@ mark_as_advanced(CMAKE_SYSROOT) set(CMAKE_CXX_FLAGS_INIT "-m64 -mno-red-zone -mcmodel=large -fno-exceptions -ffunction-sections -fdata-sections") set(CMAKE_CXX_FLAGS_DEBUG "-ggdb3") set(CMAKE_ASM_FLAGS_DEBUG "-ggdb3") -set(CMAKE_EXE_LINKER_FLAGS_INIT "-nostartfiles -Wl,-gc-sections") +set(CMAKE_EXE_LINKER_FLAGS_INIT "-nostartfiles -Wl,--gc-sections") set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> \ <FLAGS> \ diff --git a/source/kernel/arch/x86_64/kern.ld b/source/kernel/arch/x86_64/kern.ld index 4e44cfa..78cc363 100644 --- a/source/kernel/arch/x86_64/kern.ld +++ b/source/kernel/arch/x86_64/kern.ld @@ -119,7 +119,7 @@ SECTIONS .data ALIGN(4K) : AT (ADDR (.data) - TEACHOS_HIGH) { - *(.data) + *(.data*) } .bss ALIGN(4K) : AT (ADDR (.bss) - TEACHOS_HIGH) |
