This is the mail archive of the ecos-discuss@sources.redhat.com 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]

Re: linking problem when using "fopen"


jyl087@netscape.net wrote:
> 
> Jonathan Larmour <jlarmour@redhat.com> wrote:
> 
> You've gone a bit over my head...  Naturally the above test
> of "int *foo = new int" fails on my setup.
> 
> By the way, when you say that "type_info type_info node" is declared
> in tinfo.cc... do you mean that there is a static var called "node"
> of class "type_info" declared? I'm not sure I see that in my tinfo.cc.
> What line?

I think it's a side effect of "#pragma implementation "typeinfo"" near the
top.

> Here's the "arm-elf-nm" dump of my libgcc.a. Only the "tinfo.o"
> section is shown.
>
> Could it be that my binutils were compiled with a flag like
> -fvtable-gc that caused my libgcc.a to be incomplete?

Even if the binutils were compiled that way, it wouldn't affect the way
libgcc builds. If you are using genuine gcc 2.95.2 sources, this should
really just work. Here's my arm-elf-nm -C dump for tinfo.o for comparison
(the -C means to do the C++ name demangling):

tinfo.o:
00000000 t .gcc2_compiled.
00000718 T bad_typeid::~bad_typeid(void)
00000000 W __si_type_info::~__si_type_info(void)
00000000 W __user_type_info::~__user_type_info(void)
00000000 W __class_type_info::~__class_type_info(void)
00000664 T bad_cast::~bad_cast(void)
00000000 T type_info::~type_info(void)
0000068c T bad_typeid::bad_typeid(void)
000007d8 T __si_type_info::__si_type_info(char const *, __user_type_info
const &)
00000740 T __user_type_info::__user_type_info(char const *)
000008cc T __class_type_info::__class_type_info(char const *,
__class_type_info::base_info const *, unsigned long)
000005d8 T bad_cast::bad_cast(void)
0000058c T type_info::type_info(char const *)
         U __builtin_delete
00000028 T type_info::operator==(type_info const &) const
         U __get_eh_context
000005c0 T type_info::operator!=(type_info const &) const
00000060 T __rtti_class
00000188 T __rtti_si
000002a4 T __rtti_user
00000000 W bad_typeid type_info function
00000000 W __si_type_info type_info function
00000000 W __user_type_info type_info function
00000000 W __class_type_info type_info function
00000000 W bad_cast type_info function
         U exception type_info function
00000000 W type_info type_info function
0000000c C bad_typeid type_info node
0000000c C __si_type_info type_info node
0000000c C __user_type_info type_info node
0000000c C __class_type_info type_info node
0000000c C bad_cast type_info node
         U exception type_info node
00000008 C type_info type_info node
00000000 W bad_typeid virtual table
00000000 W __si_type_info virtual table
00000000 W __user_type_info virtual table
00000000 W __class_type_info virtual table
00000000 W bad_cast virtual table
         U exception virtual table
00000000 W type_info virtual table
00000394 T __si_type_info::dcast(type_info const &, int, void *, type_info
const *, void *) const
00000370 T __user_type_info::dcast(type_info const &, int, void *,
type_info const *, void *) const
00000400 T __class_type_info::dcast(type_info const &, int, void *,
type_info const *, void *) const
000005ac T type_info::name(void) const
         U strcmp
         U exception::what(void) const

 
> Let me know if there's anything else I should try...

Well if you're happy for now with a workaround for fopen in place, then
fair enough. But there is definitely something iffy with your tools. 2.95.2
sources shouldn't be different from the ones I built. The only suggestion
is that if you have any future problems, to downgrade your binutils sources
and rebuild your gcc from scratch using them.
 
> PS: On another subject - I think my previous difficulties with
> GDB over serial were due to hardware handshaking problems. I'm
> not exactly sure what I did to fix it, but it seems to work now...

Ah good.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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