Re: crt0.o and _start symbol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bahadir Balban <bahadir.balban@xxxxxxxxx> writes:

> I am compiling a program with GCC using the -nostdlib and
> -ffreestanding flags, and linking it against a C library. I am also
> compiling the C library using GCC.
>
> The problem is that even though I link the C library with crt0.o file,
> and confirm that _start symbol is also there in the libc.a archive,
> When I link the program against the C library, it complains about not
> finding _start symbol.
>
> If I explicitly include crt0.o in the program link, then it works OK.
> Any reason why I can't get this symbol by directly linking with the C
> library archive?

This is a question about the GNU binutils, not about gcc.  I recommend
taking any followup to binutils@xxxxxxxxxxxxxxx  See
http://sourceware.org/binutils/ .

The answer is that -e does not imply -u, although that is likely to
change in the next binutils release.  Most systems link against crt0.o
explicitly.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux