| ▲ | OutOfHere an hour ago | |
An agentic LLM should be pretty good at Arm64 assembly generation, but maintainability of large code could become an issue. Why would it not run on Linux? | ||
| ▲ | imtomt 38 minutes ago | parent | next [-] | |
I wrote it for MacOS because I don't have a Linux machine right now :( Once I get one up and running again, I'll probably work on porting this. As for why it wouldn't run on Linux, there are some pretty big differences in the actual assembly. One pretty superficial difference is calling conventions -- MacOS uses the x16 register for syscall numbers, Linux uses x8. Calling the kernel in Mac uses "svc #0x80", in Linux it's "svc #0". That's ~120 lines that need to be replaced, but easy enough to just use sed. Syscall numbers are all different, as are the struct layouts for sigaction(), MacOS has an "sa_tramp" field that Linux doesn't have. Enforcing max processes is done here using the MacOS-specific proc_info() syscall, which can be used to get the number of children any given process has. Linux doesn't have an equivalent, so process tracking would need to be done differently. Finally, Linux has the getdents64() syscall, rather than getdirentries64(), which uses a different struct and is called differently. I'm sure an LLM could make all those changes, but it's a pretty large codebase, so it would probably make some mistakes or miss things. | ||
| ▲ | shepherdjerred an hour ago | parent | prev [-] | |
The first paragraph of the README says this was hand written so I’m not sure why you’re bringing up LLMs | ||