General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
HalfSourLizard
DistroTube
comments
Comments by "HalfSourLizard" (@halfsourlizard9319) on "Ubuntu Ditches GNU Core Utilities (Because...Rust?)" video.
Yup. They're invoking Linux code -- not GNU or GNU/Linux code -- by doing, ultimately, a `syscall` or `svc` opcode which transfers control to the kernel and runs whatever kernel sys-call code `rax` or `r7` specifies ... and yes, probably via C wrappers from `sys/syscall.h`.
10
@jamesevans2507 Well, you can write assembly and interface that way -- either by writing straight asm or some languages allow embedding asm.
1
@dawin64 And NOT wanting the bloat of glibc is at least one reason that you might want to do the syscalls directly.
1
Also glibc is a giant PITA if you want to do a fully-statically-linked build. Yes, if you have Musl available, great ... but if not, that's potentially another reason to go through asm directly.
1
@jamesevans2507 Maybe I misunderstood earlier. But `syscall` to take x64 as an example is a CPU supported instruction that can be called directly (assuming correct reg config) from machine code. Things like `glibc` expose C wrapper functions that are afaik, asm under the covers, bridging the C calling convention (i.e., positional args) with the register-based one of the `syscall` handler.
1