diff options
author | Zixian Cai <2891235+caizixian@users.noreply.github.com> | 2024-05-01 15:56:22 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 22:56:22 -0700 |
commit | aa570eb8314b59eb6ffa1ea6b7b7224b2db0937a (patch) | |
tree | 6803c4a50a0500f4130bc4eb4b7abec94b288725 /pk/elf.c | |
parent | bfd4044f67e2a6787ae8ae7963876573c0ac40f5 (diff) | |
download | riscv-pk-aa570eb8314b59eb6ffa1ea6b7b7224b2db0937a.zip riscv-pk-aa570eb8314b59eb6ffa1ea6b7b7224b2db0937a.tar.gz riscv-pk-aa570eb8314b59eb6ffa1ea6b7b7224b2db0937a.tar.bz2 |
Use kassert in load_elf (#327)
Signed-off-by: Zixian Cai <2891235+caizixian@users.noreply.github.com>
Diffstat (limited to 'pk/elf.c')
-rw-r--r-- | pk/elf.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |