This is the mail archive of the ecos-devel@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

AW: undefined reference to '_impure_ptr' again


> Von: ecos-devel-owner@ecos.sourceware.org
> [mailto:ecos-devel-owner@ecos.sourceware.org]Im Auftrag von David Luca
> 
> Hello again, although I searched the mailing lists for
> this error, I couldn't find any solving to this linker
> error. 
> 
> arm-elf-gcc -fno-builtin -mcpu=arm9tdmi -mhard-float
> -c -Wall -O -ggdb -I. -Wall
>  -nostdlib -Imc9328_install/include -O2
> -ffunction-sections -fdata-sections -fno
> -rtti -fno-exceptions -fvtable-gc -fno-schedule-insns
> -fno-schedule-insns2 -D MO
> NCOMPTR=0x10000038 -o hello.o hello.cpp
> cc1plus: warning: switch '-fvtable-gc' is no longer
> supported
> echo tools: arm-elf
> tools: arm-elf
> arm-elf-ld -o hello -Lmc9328_install/lib
> -L/opt/ecos/gnutools/arm-elf/lib/gcc/ar
> m-elf/4.1.1/fpu
> -L/opt/ecos/gnutools/arm-elf/arm-elf/lib/fpu hello.o
> -Ttarget.ld
>  -nostdlib
> /opt/ecos/gnutools/arm-elf/arm-elf/lib/fpu/libsupc++.a(vterminate.o):
> In function
> `__gnu_cxx::__verbose_terminate_handler()':
> ../../../../../gcc-4.1.1/libstdc++-v3/libsupc++/vterminate.cc:89:
> undefined reference to `_impure_ptr'
> make: *** [hello] Error 1

As far as I understand this: the only place where _impure_ptr is used is in vterminate.cc. The function where it is used is only called when the application exits, I don't remember exactly, maybe it had even to do with exceptions, not sure.
So, if your ecos application exits, you're in deep trouble anyway.
Just define some pointer so that the undefined reference goes away, it won't be used anyway.
We made it just as big as it should be.
It contains stuff like FILE pointer or something like this, which anyway can't be correct for ecos since this comes from gcc which doesn't know about the stuff used in ecos, so it must be host stuff, i.e. irrelevant for the ecos application.

If I'm wrong with this, please let me know.

Bye
Alex


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]