diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2005-07-26 20:37:13 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2005-07-26 20:37:13 +0000 |
commit | 12499c7a5d771cf9802e95c3e272119fc5f3d6f0 (patch) | |
tree | 7451bd9a4cc2a6debfcdf1541f8239f024f5acd4 /newlib | |
parent | 8efb275cc3fab5efa9b0fb7e33e785b8647c0c05 (diff) | |
download | newlib-12499c7a5d771cf9802e95c3e272119fc5f3d6f0.zip newlib-12499c7a5d771cf9802e95c3e272119fc5f3d6f0.tar.gz newlib-12499c7a5d771cf9802e95c3e272119fc5f3d6f0.tar.bz2 |
* libc/machine/cris/libcdtor.c (defaultors): Mark artificially as
used.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/machine/cris/libcdtor.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index fc79c58..719990c 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2005-07-26 Hans-Peter Nilsson <hp@bitrange.com> + + * libc/machine/cris/libcdtor.c (defaultors): Mark artificially as + used. + 2005-07-20 Bob Wilson <bob.wilson@acm.org> Darin Petkov <darin@tensilica.com> diff --git a/newlib/libc/machine/cris/libcdtor.c b/newlib/libc/machine/cris/libcdtor.c index d17cdeb..3273477 100644 --- a/newlib/libc/machine/cris/libcdtor.c +++ b/newlib/libc/machine/cris/libcdtor.c @@ -45,10 +45,13 @@ __asm__ extern vfnp * const _Ctors asm(".$global.lib.ctors"); extern vfnp * const _Dtors asm(".$global.lib.dtors"); -/* We better provide weak empty ctor and dtor lists, since they are not - created if the main program does not have ctor/dtors. */ +/* We better provide weak empty ctor and dtor lists, since they are + not created if the main program does not have ctor/dtors. Because + it's otherwise not used, GCC trunk "Mon Jul 25 22:33:14 UTC 2005" + thinks it can remove defaultors, so we need to artificially mark it + as used. FIXME: Perhaps a GCC bug. */ -static vfnp const defaultors[] = {0, 0}; +static vfnp const defaultors[] __attribute__ ((__used__)) = {0, 0}; extern vfnp * __CTOR_LIST__ __attribute__ ((weak, alias ("defaultors"))); extern vfnp * __DTOR_LIST__ __attribute__ ((weak, alias ("defaultors"))); |