public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: "Neundorf, Alexander" <Alexander.Neundorf@jenoptik.com>
To: "David Luca" <davidluca3000@yahoo.com>,
	        "ecos-devel" <ecos-devel@sourceware.org>
Subject: AW: undefined reference to '_impure_ptr' again
Date: Tue, 21 Nov 2006 16:40:00 -0000	[thread overview]
Message-ID: <5A8A17126B73AC4C83968F6C4505E3C505B8EFD6@JO-EX01.JENOPTIK.NET> (raw)

> 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

                 reply	other threads:[~2006-11-21 16:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A8A17126B73AC4C83968F6C4505E3C505B8EFD6@JO-EX01.JENOPTIK.NET \
    --to=alexander.neundorf@jenoptik.com \
    --cc=davidluca3000@yahoo.com \
    --cc=ecos-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).