This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: implementation of opendir and readdir


Deal Paul:

That's great help.  Thanks for the clarification.

Best
Yang

-----Original Message-----
From: Paul Pluzhnikov [mailto:ppluzhnikov@google.com] 
Sent: Wednesday, September 04, 2013 10:59 AM
To: Li, Yang
Cc: libc-help@sourceware.org
Subject: Re: implementation of opendir and readdir

On Wed, Sep 4, 2013 at 10:30 AM, Li, Yang <YLi@ballytech.com> wrote:

> So my first question is, when a user called "readdir", which function is it actually linked to?

Neither of the ones you found.

The actual readdir on Linux is in sysdeps/posix/readdir.c

> How does the linker know not to link against "glibc" and link to some kernel provided library?

You are confused. There is no such thing as "kernel provided library".
It is impossible for user code to link directly to any code in linux3.11/fs/...

> So where are the actual source code for processing "opendir"?

sysdeps/posix/opendir.c

HTH,
-- 
Paul Pluzhnikov



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]