This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
ecos for i386 target
- From: Santanu Chatterjee <thisissantanu at gmail dot com>
- To: ecos-discuss at ecos dot sourceware dot org
- Date: Sun, 17 Apr 2005 19:38:27 +0530
- Subject: [ECOS] ecos for i386 target
- Reply-to: Santanu Chatterjee <thisissantanu at gmail dot com>
Hello everybody,
I was trying to compile ecos-2.0 for the i386 pc target. The building of the
libraries went smoothly. No errors.
However, when I tried to run make on the example programs, I got the
following errors :
---------------------------------------------------
gcc -nostartfiles -L../untitled_install//lib -Ttarget.ld -g -nostdlib
-Wl,--gc-sections -Wl,-static -o hello hello.o
../untitled_install//lib/libtarget.a(kernel_thread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2d):
In function `__static_initialization_and_destruction_0(int, int)':
/home/santanu/eCos-Project/ecos-work/untitled_install/include/cyg/kernel/thread.inl:243:
undefined reference to `__dso_handle'
../untitled_install//lib/libtarget.a(kernel_thread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x3c):/home/santanu/eCos-Project/ecos-work/untitled_install/include/cyg/kernel/thread.inl:82:
undefined reference to `__cxa_atexit'
../untitled_install//lib/libtarget.a(kernel_intr.o)(.text._Z41__static_initialization_and_destruction_0ii+0x23):
In function `__static_initialization_and_destruction_0':
/home/santanu/eCos-Project/ecos-2.0/packages/kernel/v2_0/src/intr/intr.cxx:181:
undefined reference to `__dso_handle'
../untitled_install//lib/libtarget.a(kernel_intr.o)(.text._Z41__static_initialization_and_destruction_0ii+0x38):/home/santanu/eCos-Project/ecos-2.0/packages/kernel/v2_0/src/intr/intr.cxx:255:
undefined reference to `__cxa_atexit'
../untitled_install//lib/libtarget.a(kernel_sched.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2d):
In function `__static_initialization_and_destruction_0(int, int)':
/home/santanu/eCos-Project/ecos-2.0/packages/kernel/v2_0/src/sched/sched.cxx:384:
undefined reference to `__dso_handle'
../untitled_install//lib/libtarget.a(kernel_sched.o)(.text._Z41__static_initialization_and_destruction_0ii+0x3c):
In function `__static_initialization_and_destruction_0(int, int)':
/home/santanu/eCos-Project/ecos-work/untitled_install/include/cyg/infra/clist.hxx:137:
undefined reference to `__cxa_atexit'
../untitled_install//lib/libtarget.a(language_c_libc_startup_mainthread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x60):
In function `__static_initialization_and_destruction_0':
/home/santanu/eCos-Project/ecos-2.0/packages/language/c/libc/startup/v2_0/src/mainthread.cxx:120:
undefined reference to `__dso_handle'
../untitled_install//lib/libtarget.a(language_c_libc_startup_mainthread.o)(.text._Z41__static_initialization_and_destruction_0ii+0x6f):/home/santanu/eCos-Project/ecos-2.0/packages/language/c/libc/startup/v2_0/src/mainthread.cxx:120:
undefined reference to `__cxa_atexit'
../untitled_install//lib/libtarget.a(language_c_libc_stdio_stdout.o)(.text._Z41__static_initialization_and_destruction_0ii+0x8d):
In function `__static_initialization_and_destruction_0':
/home/santanu/eCos-Project/ecos-2.0/packages/language/c/libc/stdio/v2_0/src/common/stdout.cxx:84:
undefined reference to `__dso_handle'
../untitled_install//lib/libtarget.a(language_c_libc_stdio_stdout.o)(.text._Z41__static_initialization_and_destruction_0ii+0x9a):/home/santanu/eCos-Project/ecos-2.0/packages/language/c/libc/stdio/v2_0/src/common/stdout.cxx:84:
undefined reference to `__cxa_atexit'
../untitled_install//lib/libtarget.a(kernel_clock.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2d):
In function `__static_initialization_and_destruction_0(int, int)':
/home/santanu/eCos-Project/ecos-work/untitled_install/include/cyg/infra/clist.hxx:137:
undefined reference to `__dso_handle'
../untitled_install//lib/libtarget.a(kernel_clock.o)(.text._Z41__static_initialization_and_destruction_0ii+0x3c):
In function `__static_initialization_and_destruction_0(int, int)':
/home/santanu/eCos-Project/ecos-work/untitled_install/include/cyg/kernel/sched.inl:101:
undefined reference to `__cxa_atexit'
../untitled_install//lib/libtarget.a(services_memalloc_common_heaps.o)(.text._Z41__static_initialization_and_destruction_0ii+0x51):
In function `__static_initialization_and_destruction_0(int, int)':
/home/santanu/eCos-Project/ecos-work/untitled_install/include/cyg/infra/clist.hxx:192:
undefined reference to `__dso_handle'
../untitled_install//lib/libtarget.a(services_memalloc_common_heaps.o)(.text._Z41__static_initialization_and_destruction_0ii+0x60):/home/santanu/eCos-Project/ecos-work/untitled_install/include/cyg/infra/clist.hxx:138:
undefined reference to `__cxa_atexit'
../untitled_install//lib/libtarget.a(language_c_libc_stdio_stderr.o)(.text._Z41__static_initialization_and_destruction_0ii+0x8a):
In function `__static_initialization_and_destruction_0':
/home/santanu/eCos-Project/ecos-2.0/packages/language/c/libc/stdio/v2_0/src/common/stderr.cxx:84:
undefined reference to `__dso_handle'
../untitled_install//lib/libtarget.a(language_c_libc_stdio_stderr.o)(.text._Z41__static_initialization_and_destruction_0ii+0x97):/home/santanu/eCos-Project/ecos-2.0/packages/language/c/libc/stdio/v2_0/src/common/stderr.cxx:84:
undefined reference to `__cxa_atexit'
../untitled_install//lib/libtarget.a(language_c_libc_stdio_stdin.o)(.text._Z41__static_initialization_and_destruction_0ii+0x87):
In function `__static_initialization_and_destruction_0':
/home/santanu/eCos-Project/ecos-2.0/packages/language/c/libc/stdio/v2_0/src/common/stdin.cxx:84:
undefined reference to `__dso_handle'
../untitled_install//lib/libtarget.a(language_c_libc_stdio_stdin.o)(.text._Z41__static_initialization_and_destruction_0ii+0x94):/home/santanu/eCos-Project/ecos-2.0/packages/language/c/libc/stdio/v2_0/src/common/stdin.cxx:84:
undefined reference to `__cxa_atexit'
../untitled_install//lib/libtarget.a(language_c_libc_stdio_stdiofiles.o)(.text._Z41__static_initialization_and_destruction_0ii+0x2d):
In function `__static_initialization_and_destruction_0':
/home/santanu/eCos-Project/ecos-2.0/packages/language/c/libc/stdio/v2_0/src/common/stdiofiles.cxx:79:
undefined reference to `__dso_handle'
../untitled_install//lib/libtarget.a(language_c_libc_stdio_stdiofiles.o)(.text._Z41__static_initialization_and_destruction_0ii+0x3c):/home/santanu/eCos-Project/ecos-2.0/packages/language/c/libc/stdio/v2_0/src/common/stdiofiles.cxx:79:
undefined reference to `__cxa_atexit'
collect2: ld returned 1 exit status
make: *** [hello] Error 1
----------------------------------------------------
It seems like somekind of error related to the linker, but I can't figure out
what it is or how to fix it (I'm still very much a newbie to ecos).
I downloaded the latest ecos sources from anoncvs and tried the same,
but I get the same errors. I'm using gcc-3.3 (I'm using the same, without
any prefix to gcc for the i386 target as well) on Ubuntu Warty.
Also, the above procedure worked well for the linux synthetic target, but
it is not working for i386 target.
Can anyone from this list please provide some guidelines as to how to
fix this error. My present intention is to boot ecos from a floppy using redboot
and then run a sample program with no other OS running, so that I can
see the thread switching timings using an oscillator.
Thank you in advance.
Regards,
Santanu
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss