This is the mail archive of the ecos-devel@sourceware.org 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]

Compiler errors for eCos C++ files using __attribute__((init_priority(_pri_))) when compiling tests for a new Cortex-R4 hal.


Hi there,

I'm preparing a simple Cortex-R4 hal (based in the i386 and other
similar ones) meant to support only armv7 architecture in a cleaner
way than the existing arm hal.

I was compiling eCos tests (make tests) for my target with the posix
template and I'm getting some undefined symbols that appear to come
from the init_priority attribute, as undefined references to
__dso_handle:

...
arm-eabi-gcc -L/home/dfernand/tmp/ecos/lib -Ttarget.ld -o
/home/dfernand/tmp/ecos/tests/infra/current/tests/cxxsupp
tests/cxxsupp.o -mthumb -mthumb-interwork -mcpu=cortex-r4 -g -nostdlib
-Wl,-static -Wl,--fatal-warnings
/home/dfernand/tmp/ecos/lib/extras.o: In function
`__static_initialization_and_destruction_0':
/home/dfernand/dfernand_general/depot/dot11/accio/mac/ecos/packages/io/fileio/current/src/misc.cxx:103:
undefined reference to `__dso_handle'
/home/dfernand/dfernand_general/depot/dot11/accio/mac/ecos/packages/io/fileio/current/src/misc.cxx:103:
undefined reference to `__dso_handle'
/home/dfernand/dfernand_general/depot/dot11/accio/mac/ecos/packages/io/fileio/current/src/misc.cxx:123:
undefined reference to `__dso_handle'
/home/dfernand/dfernand_general/depot/dot11/accio/mac/ecos/packages/io/fileio/current/src/misc.cxx:123:
undefined reference to `__dso_handle'
/home/dfernand/tmp/ecos/lib/libtarget.a(kernel_intr.o): In function
`__static_initialization_and_destruction_0':
/home/dfernand/dfernand_general/depot/dot11/accio/mac/ecos/packages/kernel/current/src/intr/intr.cxx:71:
undefined reference to `__dso_handle'
/home/dfernand/tmp/ecos/lib/libtarget.a(kernel_intr.o):/home/dfernand/dfernand_general/depot/dot11/accio/mac/ecos/packages/kernel/current/src/intr/intr.cxx:71:
more undefined references to `__dso_handle' follow
/home/arm2gcc/cortex-r4_gcc_481_001-binutils/lib/gcc/arm-eabi/4.8.1/../../../../arm-eabi/lib/thumb/libsupc++.a(atexit_arm.o):
In function `__aeabi_atexit':
/home/arm2gcc/src/gcc-4.8.1/libstdc++-v3/libsupc++/atexit_arm.cc:35:
undefined reference to `__cxa_atexit'
/home/arm2gcc/cortex-r4_gcc_481_001-binutils/lib/gcc/arm-eabi/4.8.1/../../../../arm-eabi/lib/thumb/libsupc++.a(vterminate.o):
In function `__gnu_cxx::__verbose_terminate_handler()':
/home/arm2gcc/src/gcc-4.8.1/libstdc++-v3/libsupc++/vterminate.cc:67:
undefined reference to `_impure_ptr'
/home/arm2gcc/src/gcc-4.8.1/libstdc++-v3/libsupc++/vterminate.cc:67:
undefined reference to `_impure_ptr'
/home/arm2gcc/src/gcc-4.8.1/libstdc++-v3/libsupc++/vterminate.cc:49:
undefined reference to `_impure_ptr'
/home/arm2gcc/src/gcc-4.8.1/libstdc++-v3/libsupc++/vterminate.cc:49:
undefined reference to `_impure_ptr'
/home/arm2gcc/src/gcc-4.8.1/libstdc++-v3/libsupc++/vterminate.cc:93:
undefined reference to `_impure_ptr'
/home/arm2gcc/cortex-r4_gcc_481_001-binutils/lib/gcc/arm-eabi/4.8.1/../../../../arm-eabi/lib/thumb/libsupc++.a(vterminate.o):/home/arm2gcc/src/gcc-4.8.1/libstdc++-v3/libsupc++/vterminate.cc:93:
more undefined references to `_impure_ptr' follow
/home/arm2gcc/cortex-r4_gcc_481_001-binutils/lib/gcc/arm-eabi/4.8.1/../../../../arm-eabi/lib/thumb/libsupc++.a(cp-demangle.o):
In function `d_append_num':
/home/arm2gcc/build/gcc-4.8.1/arm-eabi/thumb/libstdc++-v3/libsupc++/cp-demangle.c:3739:
undefined reference to `sprintf'
/home/arm2gcc/build/gcc-4.8.1/arm-eabi/thumb/libstdc++-v3/libsupc++/cp-demangle.c:3739:
undefined reference to `sprintf'
/home/arm2gcc/build/gcc-4.8.1/arm-eabi/thumb/libstdc++-v3/libsupc++/cp-demangle.c:3739:
undefined reference to `sprintf'
/home/arm2gcc/build/gcc-4.8.1/arm-eabi/thumb/libstdc++-v3/libsupc++/cp-demangle.c:3739:
undefined reference to `sprintf'
/home/arm2gcc/build/gcc-4.8.1/arm-eabi/thumb/libstdc++-v3/libsupc++/cp-demangle.c:3739:
undefined reference to `sprintf'
/home/arm2gcc/cortex-r4_gcc_481_001-binutils/lib/gcc/arm-eabi/4.8.1/../../../../arm-eabi/lib/thumb/libsupc++.a(cp-demangle.o):/home/arm2gcc/build/gcc-4.8.1/arm-eabi/thumb/libstdc++-v3/libsupc++/cp-demangle.c:3739:
more undefined references to `sprintf' follow
/home/arm2gcc/cortex-r4_gcc_481_001-binutils/lib/gcc/arm-eabi/4.8.1/thumb/libgcc.a(unwind-arm.o):
In function `get_eit_entry':
/home/arm2gcc/src/gcc-4.8.1/libgcc/unwind-arm-common.inc:221:
undefined reference to `__exidx_end'
/home/arm2gcc/src/gcc-4.8.1/libgcc/unwind-arm-common.inc:221:
undefined reference to `__exidx_start'
/home/arm2gcc/src/gcc-4.8.1/libgcc/unwind-arm-common.inc:221:
undefined reference to `__exidx_end'
/home/arm2gcc/src/gcc-4.8.1/libgcc/unwind-arm-common.inc:221:
undefined reference to `__exidx_start'
/home/arm2gcc/cortex-r4_gcc_481_001-binutils/lib/gcc/arm-eabi/4.8.1/../../../../arm-eabi/bin/ld:
/home/dfernand/tmp/ecos/tests/infra/current/tests/cxxsupp: hidden
symbol `__dso_handle' isn't defined
/home/arm2gcc/cortex-r4_gcc_481_001-binutils/lib/gcc/arm-eabi/4.8.1/../../../../arm-eabi/bin/ld:
final link failed: Bad value
collect2: error: ld returned 1 exit status
make[1]: *** [/home/dfernand/tmp/ecos/tests/infra/current/tests/cxxsupp] Error 1
make[1]: Leaving directory `/home/dfernand/tmp/ecos/infra/current'
make: *** [tests] Error 2

There are others that suggest that there are compiler support functions missing

Any ideas about why I'm getting this?

This is my compiler configuration (done following the usual ecos page
about toolchains, using the top of newlib sources for a few weeks
ago):
$ cortex-r4 gcc -v
Using built-in specs.
COLLECT_GCC=/home/arm2gcc/cortex-r4_gcc_481_001-binutils/bin/arm-eabi-gcc
COLLECT_LTO_WRAPPER=/home/arm2gcc/cortex-r4_gcc_481_001-binutils/libexec/gcc/arm-eabi/4.8.1/lto-wrapper
Target: arm-eabi
Configured with: /home/arm2gcc/src/gcc-4.8.1/configure
--target=arm-eabi --enable-languages=c,c++ --with-gnu-as --with-gnu-ld
--with-newlib --prefix=/home/arm2gcc/cortex-r4_gcc_481_001-binutils
--with-gxx-include-dir=/home/arm2gcc/cortex-r4_gcc_481_001-binutils/arm-eabi/include
--with-mode=thumb --with-arch=armv7-r --with-cpu=cortex-r4
--with-abi=aapcs --with-float-abi=hard --with-fpu=vfpv3-d16
--enable-interwork
--with-gmp=/home/arm2gcc/cortex-r4_gcc_481_001-binutils
--with-mpfr=/home/arm2gcc/cortex-r4_gcc_481_001-binutils
--with-mpc=/home/arm2gcc/cortex-r4_gcc_481_001-binutils
Thread model: single
gcc version 4.8.1 (GCC)


Let me know if you need additional information on other stuff.

Regards


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