grow_heap: static linking warns about madvise() not implemented
Mike Frysinger
vapier@gentoo.org
Sun Jul 22 00:31:00 GMT 2007
On Saturday 21 July 2007, Samuel Thibault wrote:
> Mike Frysinger, le Sat 21 Jul 2007 19:55:01 -0400, a écrit :
> > On Saturday 21 July 2007, Samuel Thibault wrote:
> > > When statically linking on a system on which madvise() wasn't ported,
> > > the linker complains:
> > >
> > > /bin/../lib/gcc/i486-gnu/4.0.4/../../../libcrt.a(malloc.o): In function
> > > `grow_heap': (.text+0x3t4): warning: warning: madvise is not
> > > implemented and will always fail
> > >
> > > should there really be such linker warning for madvise() whose failure
> > > doesn't have any semantic consequences, just no boost of performance?
> >
> > of course. you tried to use a func that is stubbed out, so you get a
> > warning about it.
>
> I didn't try. I just linked a program statically. The call to madvise
> comes from libc itself, in libcrt.a's grow_heap() function.
your e-mail implied that your code is calling madvise() and you were asking
about the link warning. are you saying that your code does not, but glibc
code does and that leads to a static link warning ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20070722/0417740d/attachment.sig>
More information about the Libc-alpha
mailing list