Skip to content

ABI common

Nick Andrews edited this page Nov 21, 2026 · 4 revisions
  • EI_OSABI / EI_ABIVERSION never checked: collect-aros writes ELFOSABI_AROS and ABI version 1, but no loader verifies them.

AROS_LVO_CALL5NR to AROS_LVO_CALL10NR use an undefined macro

  • Where: compiler/arossupport/include/libcall.h lines 1180, 1190, 1200, 1210, 1220, 1230.
  • What: each passes its fifth argument as AROS_LCS(a5). No AROS_LCS macro is defined anywhere; it should be AROS_LCA(a5). In addition, AROS_LVO_CALL10NR (line 1229) takes parameters a1..a9 but its body uses a10.
  • Effect: any use of these macros fails to compile.
  • Fix: replace AROS_LCS with AROS_LCA on all six lines and add a10 to the AROS_LVO_CALL10NR parameter list.

ELF loaders do not check the float ABI

  • Where: rom/dos/internalloadseg_elf.c load_header() (lines 220-224); compiler/include/dos/elf.h; arch/riscv64-sbi/kernel/kernel_elf.c.

  • What: the header check covers class, version, ET_REL, byte order and machine only. e_flags is never read. The ARM attribute parser checks Tag_CPU_arch and Tag_FP_arch but not Tag_ABI_VFP_args. elf.h has no EF_ARM_* or EF_RISCV_* constants.

  • Effect: arm (soft-float) and armhf binaries can be mixed, as can RISC-V binaries built for different float conventions. They load without error and fail at run time.

  • Fix: reject mismatches at load time: Tag_ABI_VFP_args (or `EF_ARM_ABI_F

  • Stale comments: exec/libraries.h refers to aros/machine.h for LIB_VECTSIZE; the x86_64, PowerPC and other cpu.h files carry an "i386 processor" comment copied from the i386 header; the PowerPC FullJumpVec comment says li where the code emits ori.

  • Generated stack-call inlines (tools/genmodule/writeincinline.c) treat the vector table as an array of pointers, which is wrong for m68k's 6-byte vectors. They are opt-in.

Clone this wiki locally