Mercurial > ecos
diff packages/hal/synth/arch/current/src/synth_entry.c @ 1093:c04ca65eec48
Try to resolve linking problems for C++ code built with the native
Linux tools.
| author | bartv |
|---|---|
| date | Sat, 05 Jul 2003 23:17:29 +0000 |
| parents | c3adb3b974a2 |
| children | 9169038683a3 |
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 @@ -169,6 +169,18 @@ void _linux_entry( void ) } // ---------------------------------------------------------------------------- +// Stub functions needed for linking with various versions of gcc +// configured for Linux rather than i386-elf. + +#if (__GNUC__ < 3) +// 2.95.x libgcc.a __pure_virtual() calls __write(). +int __write(void) +{ + return -1; +} +#endif + +#if (__GNUC__ >= 3) // 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 @@ -187,5 +199,17 @@ void } void* __dso_handle = (void*) &__dso_handle; +// gcc 3.2.2 (approx). The libsupc++ version of the new operator pulls +// in exception handling code, even when using the nothrow version and +// building with -fno-exceptions. libgcc_eh.a provides the necessary +// functions, but requires a dl_iterate_phdr() function. That is related +// to handling dynamically loaded code so is not applicable to eCos. +int +dl_iterate_phdr(void* arg1, void* arg2) +{ + return -1; +} +#endif + //----------------------------------------------------------------------------- // End of entry.c
