From 99a9422e999d397a2a3c2fda8378b27fb3feeb33 Mon Sep 17 00:00:00 2001 From: Amelia Coutard Date: Fri, 14 Oct 2022 16:17:48 +0200 Subject: [PATCH] Added start symbol, to start transitioning the module to elf64 --- test_module/module.mk | 2 +- test_module/test.S | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 -- 2.47.0