For the following snippet of code,
int n;
char buf[100];
int fd = open ("/etc/passwd", O_RDONLY);
n = read ( fd, buf, 100);
How the compiler comes to know that read is a system call not any library function?
How it retrieves the system call number (__NR_read)?
open() is a library function, it located in libc.a / libc.so