Mercurial > ecos
diff packages/hal/synth/arch/current/src/synth_entry.c @ 448:c3adb3b974a2
Update synthetic target to cope with recent gcc changes
| author | bartv |
|---|---|
| date | Tue, 03 Dec 2002 21:07:24 +0000 |
| parents | 7c1c8dc43ba1 |
| children | c04ca65eec48 |
line wrap: on
line diff
--- a/packages/hal/synth/arch/current/src/synth_entry.c +++ b/packages/hal/synth/arch/current/src/synth_entry.c @@ -168,5 +168,24 @@ void _linux_entry( void ) cyg_hal_sys_exit(0); } +// ---------------------------------------------------------------------------- +// Versions of gcc/g++ after 3.0 (approx.), when configured for Linux +// native development (specifically, --with-__cxa_enable), have +// additional dependencies related to the destructors for static +// objects. When compiling C++ code with static objects the compiler +// inserts a call to __cxa_atexit() with __dso_handle as one of the +// arguments. __cxa_atexit() would normally be provided by glibc, and +// __dso_handle is part of crtstuff.c. Synthetic target applications +// are linked rather differently, so either a differently-configured +// compiler is needed or dummy versions of these symbols should be +// provided. If these symbols are not actually used then providing +// them is still harmless, linker garbage collection will remove them. + +void +__cxa_atexit(void (*arg1)(void*), void* arg2, void* arg3) +{ +} +void* __dso_handle = (void*) &__dso_handle; + //----------------------------------------------------------------------------- // End of entry.c
