git: 52f3d650894d - main - arm64/vmm: Define a dummy _start symbol in vmm_hyp_blob.elf
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 11 Apr 2024 15:05:19 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=52f3d650894d84a7986f915dba75823c5b3c1249
commit 52f3d650894d84a7986f915dba75823c5b3c1249
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-04-10 14:10:10 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-04-11 15:04:22 +0000
arm64/vmm: Define a dummy _start symbol in vmm_hyp_blob.elf
To silence a linker warning about _start being missing. This blob
contains code executed at EL2 and is only meant to be entered via
exception handlers.
Reviewed by: bz, emaste
Fixes: 47e073941f4e ("Import the kernel parts of bhyve/arm64")
Differential Revision: https://reviews.freebsd.org/D44735
---
sys/conf/files.arm64 | 2 +-
sys/modules/vmm/Makefile | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64
index 632fbab5070d..c7468b577dd8 100644
--- a/sys/conf/files.arm64
+++ b/sys/conf/files.arm64
@@ -131,7 +131,7 @@ arm64/vmm/vmm_hyp.c optional vmm \
no-obj
vmm_hyp_blob.elf.full optional vmm \
dependency "vmm_hyp.o vmm_hyp_exception.o" \
- compile-with "${SYSTEM_LD_BASECMD} -o ${.TARGET} ${.ALLSRC} --defsym=text_start='0x0'" \
+ compile-with "${SYSTEM_LD_BASECMD} -o ${.TARGET} ${.ALLSRC} --defsym=_start='0x0' --defsym=text_start='0x0'" \
no-obj no-implicit-rule
vmm_hyp_blob.elf optional vmm \
dependency "vmm_hyp_blob.elf.full" \
diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile
index 1ef9e264ee97..a98f0f27e25b 100644
--- a/sys/modules/vmm/Makefile
+++ b/sys/modules/vmm/Makefile
@@ -50,9 +50,9 @@ vmm_hyp.o: vmm_hyp.c
vmm_hyp_blob.elf.full: vmm_hyp_exception.o vmm_hyp.o
${LD} -m ${LD_EMULATION} -Bdynamic -T ${SYSDIR}/conf/ldscript.arm64 \
- ${_LDFLAGS} --no-warn-mismatch --warn-common --export-dynamic \
- --dynamic-linker /red/herring -X -o ${.TARGET} ${.ALLSRC} \
- --defsym=text_start='0x0'
+ ${_LDFLAGS} --no-warn-mismatch --warn-common --export-dynamic \
+ --dynamic-linker /red/herring -X -o ${.TARGET} ${.ALLSRC} \
+ --defsym=_start='0x0' --defsym=text_start='0x0'
vmm_hyp_blob.elf: vmm_hyp_blob.elf.full
${OBJCOPY} --strip-debug ${.ALLSRC} ${.TARGET}