From 8f7ba3cdce073b82d74725c2069bac97f3271821 Mon Sep 17 00:00:00 2001 From: Zixian Cai <2891235+caizixian@users.noreply.github.com> Date: Wed, 1 May 2024 15:56:22 +1000 Subject: Use kassert in load_elf (#327) Signed-off-by: Zixian Cai <2891235+caizixian@users.noreply.github.com> --- pk/elf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pk/elf.c b/pk/elf.c index c900a2d..bdc8420 100644 --- a/pk/elf.c +++ b/pk/elf.c @@ -38,13 +38,13 @@ void load_elf(const char* fn, elf_info* info) goto fail; #if __riscv_xlen == 64 - assert(IS_ELF64(eh)); + kassert(IS_ELF64(eh)); #else - assert(IS_ELF32(eh)); + kassert(IS_ELF32(eh)); #endif #ifndef __riscv_compressed - assert(!(eh.e_flags & EF_RISCV_RVC)); + kassert(!(eh.e_flags & EF_RISCV_RVC)); #endif size_t phdr_size = eh.e_phnum * sizeof(Elf_Phdr); -- cgit v1.1