[uClibc]Disabling dynamic-linker.
Alicia da Conceicao
alicia at engine.ca
Fri May 3 12:49:42 UTC 2002
> On Thu May 02, 2002 at 02:00:14PM -0400, Alicia da Conceicao wrote:
> > /opt/uClibc/arm-elf/lib/libc.a(__uClibc_main.o): In function `__uClibc_main':
> > __uClibc_main.o(.text+0xbc): undefined reference to `_fini'
> > __uClibc_main.o(.text+0xc4): undefined reference to `_init'
> > collect2: ld returned 1 exit status
> Can you do something for me? I'd like to see what you get when
> you run 'nm libc/misc/internals/__uClibc_main.o'. This is what
> I see:
> $ nm libc/misc/internals/__uClibc_main.o
> U _GLOBAL_OFFSET_TABLE_
> 00000000 D __environ
> w __errno_location
> w __h_errno_location
> 00000000 T __uClibc_main
> w _fini
> w _init
> w _stdio_init
> w atexit
> 00000000 V environ
> U exit
> U main
Hi Erik:
I get the following:
> arm-elf-nm libc/misc/internals/__uClibc_main.o
00000000 D __environ
U __errno_location
U __h_errno_location
00000000 T __uClibc_main
U _fini
U _init
U _stdio_init
U atexit
00000000 V environ
U exit
U main
> Since _init and _fini are marked as weak, it is not necessary that
> you link with crti.o and crtn.o which provide these symbols. These
> are only needed for things like C++ support and such where one wants
> constructors and destructors to work. If you see the same thing from
> nm as I see (i.e. 'w _fini' and 'w _init'), then there may be a bug
> in elf2flt. If you see something else, do you have "HAVE_ELF=false"
> in your Config file?
Nope, I do not have "HAVE_ELF=false" in my Config, and I am not using
any C++ code. Do you have any suggestions on anything I can try?
Thanks in advance.
Alicia.
More information about the uClibc
mailing list