From: Uwe Kindler <uwe_kindler@web.de>
To: ecos-devel@sourceware.org
Cc: Bart Veer <bartv@ecoscentric.com>, jifl@jifvik.org
Subject: Re: Strange __cxa_pure_virtual problem
Date: Thu, 13 Aug 2009 08:00:00 -0000 [thread overview]
Message-ID: <4A83C81E.9060402@web.de> (raw)
In-Reply-To: <pn4osc6ecb.fsf@delenn.bartv.net>
Hi Bart,
here you will find some linker maps:
http://www.cetoni.de/ecos_ld_maps_20090813.zip
> What happens if you then try to link a trivial eCos application which
> declares a static string object? I suspect that is going to pull in
> __cxa_guard_release() again, which will take its __cxa_pure_virtual()
> from libsup++.a instead of libtarget.a. So deleting the static from
> the declaration is only moving the problem, not solving it.
>
> Bart
>
1.
I compiled a trivial eCos application (only a main function) which
declares a static ustl string object. You will find the linker map in
the zip archiv (ecos_app_ustl.map). I used the same eCos config that
crashed on building the diag_printf1() test.
The application is build properly. You are right - it pulls in the
__cxa_guard_release() and __cxa_pure_virtual() from libsupc++.a.
2.
I did not changed anything in the main function but added the class
declarations and implementations of the cxxsupp.cxx test in front of the
main function but did not created any object of these classes. The
linker map is in the zip archive (ecos_app_ustl_pure.map).
All the __cxa_.... stuff like __cxa_guard_release() is still pulled in
but now the application uses the __cxa_pure_virtual() from infra/pure.cxx.
(/home/Nutzer/ustl_test_0q_nofio_install/lib/libtarget.a(infra_pure.o)
twothreads.o (__cxa_pure_virtual))
3.
I created a default eCos library (template default). I compiled a
trivial eCos application that contains a main function and in front of
the main function the class declarations and implementations of the
cxxsupp.cxx test. In the main function I declared a static object of
type Derived:
int main(int argc, char *argv[])
{
static Derived deriv(1);
...
The linker map is in the zip archive (ecos_app_default.map).
All the __cxa_.... stuff like __cxa_guard_release() is still pulled in
but now the application uses the __cxa_pure_virtual() from
infra/pure.cxx. That means no uSTL stuff but all __cxa_... stuff present.
Summary:
As soon as I declare a static object of a class with pure virtual
functions, a lot of __cxa_... stuff is pulled in from libsupc++. This
does not depend on uSTL package.
If the static object is a string from uSTL package, the
__cxa_pure_virtual() function from libsupc++ is used. If the class
declaration is part of the application then the __cxa_pure_virtual()
from infra/pure.cxx is used.
Do you have any suggestions how to continue with uSTL package integration?
Regards, Uwe
http://www.cetoni.de/ecos_ld_maps_20090813.zip
next prev parent reply other threads:[~2009-08-13 8:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-12 17:49 Uwe Kindler
2009-08-12 19:07 ` Bart Veer
2009-08-13 8:00 ` Uwe Kindler [this message]
2009-08-19 10:37 ` Bart Veer
-- strict thread matches above, loose matches on Subject: below --
2009-08-19 14:35 cetoni GmbH - Uwe Kindler
2009-08-19 16:05 ` John Dallaway
2009-08-21 14:55 ` Bart Veer
[not found] <4A827EDC.3030004@cetoni.de>
2009-08-12 14:15 ` Jonathan Larmour
2009-08-12 9:10 cetoni GmbH - Uwe Kindler
2009-08-08 6:04 Uwe Kindler
2009-08-07 11:35 cetoni GmbH - Uwe Kindler
2009-08-07 12:04 ` John Dallaway
2009-08-07 13:40 ` Bart Veer
2009-08-07 15:08 ` John Dallaway
2009-08-07 15:42 ` Bart Veer
2009-08-11 9:05 ` Daniel Néri
2009-08-07 16:31 ` Sergei Gavrikov
2009-08-12 1:34 ` Jonathan Larmour
2009-08-05 18:55 Uwe Kindler
2009-08-07 9:35 ` John Dallaway
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=4A83C81E.9060402@web.de \
--to=uwe_kindler@web.de \
--cc=bartv@ecoscentric.com \
--cc=ecos-devel@sourceware.org \
--cc=jifl@jifvik.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).