Re: Undefined symbol timer_delete()?

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Sat, 16 Jun 2007 18:37:41 -0700
On Sat, Jun 16, 2007 at 05:55:06PM -0400, Craig Rodrigues wrote:
> On Sat, Jun 16, 2007 at 01:54:34PM -0700, Steve Kargl wrote:
> > mobile:kargl[205] cc -o z j.c -lrt
> > 
> > It appears that the manpage is wrong
> > 
> > LIBRARY
> >      Standard C Library (libc, -lc)
> 
> Thanks, yes the man page is wrong, timer_delete() and friends
> are in librt not in libc.
> 
> It looks like similarly the man pages for
> mq_open() and friends are wrong, because mq_* exist in librt, not
> in libc.
> 
> Do the aio_* functions in this library augment or replace those
> in libc?
> 

I'm not sure.  I know the timer_delete function is defined as
a weak symbol

mobile:kargl[205] find . -type f | xargs grep timer_delete
...
./librt/timer.c:extern int __sys_ktimer_delete(int);
./librt/timer.c:__weak_reference(__timer_delete, timer_delete);
./librt/timer.c:__weak_reference(__timer_delete, _timer_delete);
./librt/timer.c:__timer_delete(timer_t timerid)

which I believe means it can be overridden.  Looking at librt/aio.c
shows 

__weak_reference(__aio_read, _aio_read);
__weak_reference(__aio_read, aio_read);
__weak_reference(__aio_write, _aio_write);
__weak_reference(__aio_write, aio_write);
__weak_reference(__aio_return, _aio_return);
__weak_reference(__aio_return, aio_return);
__weak_reference(__aio_waitcomplete, _aio_waitcomplete);
__weak_reference(__aio_waitcomplete, aio_waitcomplete);
__weak_reference(__aio_fsync, _aio_fsync);
__weak_reference(__aio_fsync, aio_fsync);

David Xu can probably answer your question, but I haven't
seen a recent email from him.

-- 
Steve
Received on Sat Jun 16 2007 - 23:38:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:12 UTC