aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/scripts
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2024-09-17 16:37:38 +0000
committerFelix Morgner <felix.morgner@ost.ch>2024-09-17 16:37:44 +0000
commitb0a8b9e80468a61994dec17be6b5ee6516efa73a (patch)
tree199bb3ccf38a72aa76e462d57f5f3a12218792a7 /arch/x86_64/scripts
parent858c338db6fe9080f519821e16398ea7bc6a2f3e (diff)
downloadteachos-b0a8b9e80468a61994dec17be6b5ee6516efa73a.tar.xz
teachos-b0a8b9e80468a61994dec17be6b5ee6516efa73a.zip
build: fix CRT code linking
CMake used to generate object files with a .obj extension. This appears to no longer be the case. As a fallback, we now match on 'o*' for the CRT code in the linker script. As of now, it is unclear when this change happened.
Diffstat (limited to 'arch/x86_64/scripts')
-rw-r--r--arch/x86_64/scripts/kernel.ld12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86_64/scripts/kernel.ld b/arch/x86_64/scripts/kernel.ld
index 765a432..943266c 100644
--- a/arch/x86_64/scripts/kernel.ld
+++ b/arch/x86_64/scripts/kernel.ld
@@ -74,9 +74,9 @@ SECTIONS
* Make sure that the crt code is wrapped around the compiler generated
* initialization code.
*/
- KEEP(*crti.s.obj(.init))
- KEEP(*(EXCLUDE_FILE (*crti.s.obj *crtn.s.obj) .init))
- KEEP(*crtn.s.obj(.init))
+ KEEP(*crti.s.o*(.init))
+ KEEP(*(EXCLUDE_FILE (*crti.s.o* *crtn.s.o*) .init))
+ KEEP(*crtn.s.o*(.init))
} :text
.fini ALIGN(4K) : AT(ADDR (.fini) - TEACHOS_HIGH)
@@ -85,9 +85,9 @@ SECTIONS
* Make sure that the crt code is wrapped around the compiler generated
* finalizer code.
*/
- KEEP(*crti.s.obj(.fini))
- KEEP(*(EXCLUDE_FILE (*crti.s.obj *crtn.s.obj) .fini))
- KEEP(*crtn.s.obj(.fini))
+ KEEP(*crti.s.o*(.fini))
+ KEEP(*(EXCLUDE_FILE (*crti.s.o* *crtn.s.o*) .fini))
+ KEEP(*crtn.s.o*(.fini))
}
.text ALIGN(4K) : AT(ADDR (.text) - TEACHOS_HIGH)