libgloss/arm/libcfunc.c: alarm [PATCH]

Jeff Johnston jjohnstn@redhat.com
Mon Jul 11 21:58:00 GMT 2005


Shaun Jackman wrote:
> The definition of alarm in libgloss/arm/libcfunc.c is a stub, but
> overriding the alarm stub also required overriding abort, which is not
> a stub but a useful function.
> 
> In this patch I've moved it to libnosys. Although, libnosys has only
> been used for system call (i.e. underscore prefixed) functions, so I'm
> not sure this is the best home. Perhaps a new library, libstubs, would
> be useful for these sort of non-syscall stub functions.
> 

Originally, I was anticipating some of the other ARM maintainers/users 
might speak up.  I have no real objection to moving alarm to libnosys, 
but have you considered the ramifications of your change?  Unless the 
compiler generates a -lnosys reference, you will break linking for 
others.  If -lnosys was added to the appropriate specs files that use 
libcfunc.o, that could solve the problem.  I have no idea if anybody 
links without the spec file.  ARM folks??

-- Jeff J.

> Cheers,
> Shaun
> 
> 2005-05-19  Shaun Jackman  <sjackman@gmail.com>
> 
> 	* libgloss/arm/libcfunc.c (alarm): Remove.
> 	* libgloss/libnosys/alarm.c: New file.
> 
> --- libgloss/arm/libcfunc.c-	2004-06-09 12:06:50.000000000 -0700
> +++ libgloss/arm/libcfunc.c	2005-05-19 14:02:01.000000000 -0700
> @@ -33,8 +33,3 @@
>   asm ("mov r0,#17\nswi %a0" :: "i" (SWI_Exit));
>   #endif
>  }
> -
> -void
> -alarm (void)
> -{
> -}
> --- /dev/null   2005-05-18 14:50:21.000000000 -0700
> +++ libgloss/libnosys/alarm.c     2005-05-19 14:05:56.000000000 -0700
> @@ -0,0 +1,13 @@
> +/*
> + * Stub version of alarm.
> + */
> +
> +#include "config.h"
> +#include "warning.h"
> +
> +void
> +alarm (void)
> +{
> +}
> +
> +stub_warning (alarm)



More information about the Newlib mailing list