[lug] Hi there! / Query for low-level system call documentation
stimits at comcast.net
Sun Sep 2 15:30:39 MDT 2007
Carl Hamlin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Hiya, everyone. I just joined the list yesterday and hope to make it to
> next Thursday's meeting to say hello to all of you.
> My name is Carl Hamlin. I'm a long-time ASM guy, but most of my stuff
> has been embedded code on proprietary platforms. I'm trying to get
> involved in writing for the linux operating system as manifested on the
> desktop, but I'm finding that low-level documentation of the linux
> syscall API is tough to come by, especially when we start talking about
> the socketcall subfunctions.
> Coming from an embedded software background, I'm skittish about using
> the libc wrappers instead of system calls; building external
> dependencies just doesn't seem right, even if it *does* make my
> microcode more portable. Yech. I just don't like it.
> The function table itself *used* to be exported by the kernel during
> compile time, but this is one of many features which have recently gone
> away. Even if it hadn't however, it's a piece of documentation written
> with C programmers in mind, which helps, but the requisite
> deconstruction is kind of a pain in the hind end.
> I've done a *lot* of searching on the web, and found some nice bits of
> info on this topic, but nothing that really addresses the problem as a
> whole. As it stands, I'm able to piece together functionality by
> logically deconstructing C and C++ examples of syscall implementations
> and making educated guesses about stack manipulation and register usage,
> but this is a painful process, and I can't imagine that this hasn't been
> done before by someone with an inclination to publish.
> I figured it might be worth it to put the word out that I'm looking for
> encompassing low-level docs on the linux system calls, and see what came
> of it.
There is a debug tool which you might find useful...it won't tell you
everything you need, but I've found it invaluable to debug low level
stuff: strace. It's a C-like syntax for tracing kernel system calls of
any running program. Run a particular program under that, and you can
see what the kernel itself is seeing...which can then be looked up,
rather than the original higher level language calls (this works with
D. Stimits, stimits AT comcast DOT net
More information about the LUG