Identifying which Linux system library contains a function
I am using a dev system where I have to specify the lib name when accessing a function inside it. I've used functions like open() before, and somehow found out that they're in libc.so. Now I want to use lstat(), but it appears that this one is not in libc. Sadly, the man pages I looked at do not document the location of the functions. So, two questions: Can someone tell which lib hosts lstat? How can I generally find this out? Other than using grep "name" on all files in the lib folder, I mean. Build a simple testcase in C, compile it and run 'ldd -r' on it to check what libs are loaded. If