where is __libc_open() defined in glibc 2.1 ?

http://www.linuxmisc.com/16-linux-development/8981d39aa47f1468.htm

glibc generates syscall wrappers automatically, except for some 
complicated cases, based on specifications listed in syscalls.list 
files. E.g. for open, sysdeps/unix/syscalls.list has the line: 

open            -       open            3       __libc_open     __open open 

__libc_open is the symbol to use for the wrapper, and __open and open 
are weak aliases to add for that symbol (sysdeps/unix/make-syscalls.sh 
inteprets these lists). Thus programs and shared libraries can 
override open and __open, but __libc_open always refers to the real 
sycall. 

IIRC, the lists used for Linux are sysdeps/unix/syscalls.list, 
sysdeps/unix/sysv/syscalls.list, and 
sysdeps/unix/sysv/linux/syscalls.list 

David Wragg 

 

你可能感兴趣的:(where is __libc_open() defined in glibc 2.1 ?)