Re: getpagesize() problems

Michele Alberti <[email protected]>
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
>> This works fine for me (apart from the fact that sys/user.h does not
>> exist for dietlibc and PAGE_SIZE is defined in sys/shm.h).
>
> it works for you?! Maybe i'm not good in compiling and linking with
> non-standard tools.
> I'm telling this because I tried to use sys/shm.h but it gives me
> error: PAGE_SIZE undeclared.
> This is the command I made to compile and link:
>
> $cc -static -o pagesize pagesize.c -nostdlib ../dietlibc.a -lgcc
> /usr/bin/ld warns me that it can not find the _start symbol.
> Running that example segfault immediately.
>
> So I tried the other example, ld warns me again, but the example works well.

I also try to use your "diet" wrapper and all the examples code work
well. The command:

$./diet gcc -o pagesize pagesize.c

***But I have to use the other way, not with the "diet" wrapper, but
with the "dietlibc.a" library.***

>
>>
>> What environment are you using this program in?
>> x86?  Inside user mode linux?  What kernel version?
>
> Debian i686, Linux 2.6.29.6

Debian Unstable, real machine. not UML.

> gcc: 4:4.3.3-9
> libc6: 2.9-23
> Hope this can help to understand.
thanks for your help.
Ciao,
Michele
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.