In article <[EMAIL PROTECTED]>,
Marco van de Voort <[EMAIL PROTECTED]> wrote:
> > I suspect that "gcc" isn't the standard FreeBSD C compiler in your
> > case. Try "which gcc" and find out. It works fine for me on both
> > -stable and -current with "cc":
>
> It is an older one indeed.
[...]
> St
> I suspect that "gcc" isn't the standard FreeBSD C compiler in your
> case. Try "which gcc" and find out. It works fine for me on both
> -stable and -current with "cc":
It is an older one indeed.
> blake$ cc -v -nostdlib hello.c
> Using builtin specs.
> gcc version 2.95.2 19991024 (release)
>
In article <[EMAIL PROTECTED]>,
Marco van de Voort <[EMAIL PROTECTED]> wrote:
>
> I finished the syscalls, so now I moved on the initialisation code.
>
> To test that I try to create an empty binary, which doesn't link to libc:
>
> I've put in an hour effort, and wrote the following C file:
>
> >grep exit *.o
> >
> >in /usr/lib doesn't find me that label.
> >
> >What am I missing?
>
> Try this instead:
>
> nm /usr/lib/libc.a | grep exit
I'm aware of that! That is libc which I'm trying to avoid here!
(see man gcc, search for -nostdlib)
I was referering to excuting gcc with -
> According to Marco van de Voort:
> > gcc -nostdlib empty.c /usr/lib/crti.o /usr/lib/crt0.o -o empty
>
> You mean crt1.o instead of crt0.o here right? crt0.o is the a.out version...
Yup, my fault.
> > grep exit *.o
>
> nm(1) is your Dear FriendĀ® here.
Grep and gcc -S also :-)
Anyway I m
According to Marco van de Voort:
> gcc -nostdlib empty.c /usr/lib/crti.o /usr/lib/crt0.o -o empty
You mean crt1.o instead of crt0.o here right? crt0.o is the a.out version...
> grep exit *.o
nm(1) is your Dear FriendĀ® here.
--
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- [EMAIL PROTE
In message <[EMAIL PROTECTED]> Marco van de Voort writes:
: /usr/lib/crt1.o: In function `_start':
: /usr/lib/crt1.o(.text+0x4f): undefined reference to `atexit'
: /usr/lib/crt1.o(.text+0x5c): undefined reference to `atexit'
: /usr/lib/crt1.o(.text+0x6f): undefined reference to `exit'
: in /usr/li
I finished the syscalls, so now I moved on the initialisation code.
To test that I try to create an empty binary, which doesn't link to libc:
I've put in an hour effort, and wrote the following C file:
int main (void) {
return 0;
}
gcc -nostdlib empty.c /usr/lib/crti.o /usr/lib/crt0.o -o emp
8 matches
Mail list logo