]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
fix(ld.so): use correct AdrOS syscall numbers instead of Linux numbers
authorTulio A M Mendes <[email protected]>
Thu, 16 Apr 2026 05:35:55 +0000 (02:35 -0300)
committerTulio A M Mendes <[email protected]>
Thu, 16 Apr 2026 05:35:55 +0000 (02:35 -0300)
commita9222fcf9b4f1d227783f775ad268de9337a6efc
treeaf6ab8fb0cbfeec975ae346edfd030070af4dd44
parent3c0520a8ec308fffe1f6e60165c7ff2118a55d83
fix(ld.so): use correct AdrOS syscall numbers instead of Linux numbers

dbg_write() was using Linux syscall number 4 (write) in EAX, but
AdrOS's SYSCALL_WRITE is 1. This caused dbg_write to call open()
instead of write(), so ld.so debug output never appeared.

Also fixed the inline asm to properly declare EAX as an output
operand (int $0x80 returns the result in EAX), preventing potential
compiler misoptimization.

Removed all debug prints from _start_c and dl_fixup that were
added during debugging.
user/cmds/ldso/ldso.c