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

Re: Some ways to save space on the floppies



Erik Andersen <andersen@codepoet.org> writes:

> On Fri Nov 14, 2003 at 12:21:36PM +0100, Goswin von Brederlow wrote:
> > Any idea how uclibc links against main and why glibc does not have the
> > same problem? I guess glibc links the startsup code into every bin
> > while uclibcs startup code jumps into uclibc first?
> 
> In uClibc, crt1.o on all architectures calls the
> __uClibc_start_main() function, which is responsible for
> initializing uClibc (i.e. setting up __environ, running all
> ctors, registering dtors, etc).  Inside of crt1.o we have added a
> weak reference to main(), since we had problems with linking when
> main was contained within a .o (such as with xfree86) then main
> would be omitted by the linker.
> 
> So yes, with uClibc there will be a missing weak of main()
> if you include crt1.o into your calculations.

Why weak? If you link crt1.o against something without a main your
doing something wrong and are headed towards desaster.

MfG
        Goswin



Reply to: