This is the mail archive of the
mailing list for the glibc project.
RE: implementation of opendir and readdir
- From: "Li, Yang" <YLi at ballytech dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: "libc-help at sourceware dot org" <libc-help at sourceware dot org>
- Date: Wed, 4 Sep 2013 18:14:47 +0000
- Subject: RE: implementation of opendir and readdir
- Authentication-results: sourceware.org; auth=none
- References: <088293ED3B024F458FD958C45F57D5D23CBCFE2C at LV-EXMBX03 dot ad dot agi> <CALoOobP=fyyLM_YW=3axeggG29LiQCdc9XjtML4BtyvkMKE2YA at mail dot gmail dot com>
That's great help. Thanks for the clarification.
From: Paul Pluzhnikov [mailto:firstname.lastname@example.org]
Sent: Wednesday, September 04, 2013 10:59 AM
To: Li, Yang
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"?