- Created apps/hello-world/hello-world.S: AT&T assembly user program that calls SYS_WRITE to print 'Hello, World' then SYS_EXIT(0) - Created apps/user.ld: linker script for user apps at 0x08048000 - Created scripts/build_apps.sh: builds each app dir into flat binary - Updated CMakeLists.txt: added apps build target in ISO pipeline - Updated gen_initrd.sh: packs built binaries from build/apps_bin/ - Updated kernel.c: replaced inline machine code with VFS-based loading of hello-world from /initrd/hello-world via cpio_find() Verified: hello-world binary (49 bytes) loads from CPIO initrd, prints 'Hello, World', and exits with code 0.
26 lines
369 B
Plaintext
26 lines
369 B
Plaintext
/* Linker script for ClaudeOS user-mode flat binary.
|
|
* Applications are loaded at 0x08048000 (USER_CODE_START).
|
|
* This produces a flat binary (no ELF headers). */
|
|
|
|
ENTRY(_start)
|
|
|
|
SECTIONS {
|
|
. = 0x08048000;
|
|
|
|
.text : {
|
|
*(.text)
|
|
}
|
|
|
|
.rodata : {
|
|
*(.rodata*)
|
|
}
|
|
|
|
.data : {
|
|
*(.data)
|
|
}
|
|
|
|
.bss : {
|
|
*(.bss)
|
|
}
|
|
}
|