Posts

Showing posts from August, 2006

Something about ELF auxiliary vectors

...mysterious carriers of information from kernelspace to userspace. I hit upon them while writing my last paper on sysenter based system call mechanism . In one sentence, these vectors are the mechanism to transfer some OS specific information to the program interpreter (e.g. ld) and the process. Examples of such OS specific information are - page size, system call entry point, real and effective user ids etc. Linux 2.6 specifically uses an ELF auxiliary vector called AT_SYSINFO to pass the address of __kernel_vsyscall. How these vectors are passed on? This work is done by the elf loader. Elf loader is responsible for loading elf binary files into the system. Elf loader puts these vectors on the process stack alongwith other information like argc, argv, envp. Isn't it new? Many programmers are unaware of these extra creatures on the stack (at least, I was one of them ;)). To make life easier for them (and for me too), I have written this article, nah a small writeup on elf aux...