Re: statically linking standard libraries

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

 



JJ <alchemistmba@xxxxxxxxx> writes:

> I've gotten to a point where g++ no longer complains about missing
> functions in my program. It now complains about some system(?)
> functions:
>
> $ cross-g++ -Bstatic -Xlinker -T -Xlinker temp.ld -o
> standalone_program xyz.o abc.o
>
> In function `__libc_csu_init':
> ../../elf-init.c:66: undefined reference to `__init_array_start'
> ..
> : undefined reference to `__init_array_end'
> ..
> : undefined reference to `__fini_array_start'
> ..
> ..
>
> If I specify the "-shared" option, it doesn't throw these errors. But
> I need to build a standalone program with the standard libraries built
> in - hence the "-Bstatic" option.

These symbols are normally defined by the linker script.

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