From: Amelia Coutard Date: Fri, 14 Oct 2022 14:17:48 +0000 (+0200) Subject: Added start symbol, to start transitioning the module to elf64 X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=99a9422e999d397a2a3c2fda8378b27fb3feeb33;p=voyage-au-centre-des-fichiers.git Added start symbol, to start transitioning the module to elf64 --- diff --git a/test_module/module.mk b/test_module/module.mk index 032fce7..3cee183 100644 --- a/test_module/module.mk +++ b/test_module/module.mk @@ -9,5 +9,5 @@ TO_ISO += isodir/boot/test-module isodir/boot/test-module: test_module/test.S export TMP="$$(mktemp)"; \ - printf "$$($(CXX) $(CXX_ARGS) -c "$<" -o $$TMP && objdump $$TMP -d | grep -A 10000000000 '<\.text>' | tail -n +2 | sed 's/^ *[0-9a-f]*:\t//' | sed 's/\t.*$$//' | tr -d '\n' | sed 's/ */ /g' | sed 's/^/ /' | sed 's/ $$//' | sed 's/ /\\x/g')" > isodir/boot/test-module; \ + printf "$$($(CXX) $(CXX_ARGS) -c "$<" -o $$TMP && objdump $$TMP -d | grep -A 10000000000 '<_start>' | tail -n +2 | sed 's/^ *[0-9a-f]*:\t//' | sed 's/\t.*$$//' | tr -d '\n' | sed 's/ */ /g' | sed 's/^/ /' | sed 's/ $$//' | sed 's/ /\\x/g')" > isodir/boot/test-module; \ rm "$$TMP" diff --git a/test_module/test.S b/test_module/test.S index 75d1b73..e502530 100644 --- a/test_module/test.S +++ b/test_module/test.S @@ -1,3 +1,5 @@ +.globl _start +_start: .section .text mov $65, %rdi syscall