* AW: undefined reference to '_impure_ptr' again
@ 2006-11-21 16:40 Neundorf, Alexander
0 siblings, 0 replies; only message in thread
From: Neundorf, Alexander @ 2006-11-21 16:40 UTC (permalink / raw)
To: David Luca, ecos-devel
> 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-21 16:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-21 16:40 AW: undefined reference to '_impure_ptr' again Neundorf, Alexander
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).