From b0a8b9e80468a61994dec17be6b5ee6516efa73a Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 17 Sep 2024 16:37:38 +0000 Subject: 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. --- arch/x86_64/scripts/kernel.ld | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'arch/x86_64') 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) -- cgit v1.2.3