RE: [Linux-ia64] [Patch] Fix in process.c

From: Siddha, Suresh B <suresh.b.siddha_at_intel.com>
Date: 2003-01-18 14:04:55
hi David,

Type of "ia64_ret_from_clone" is declared differently here(char as against function) and we end up linking object files with different types for the symbol(which the linker will not like).

Current C-code is assuming gcc specific behaviour(gcc does not fix the type for extern variables, leaves it to the linker). 

thanks,
suresh

> -----Original Message-----
> From: David Mosberger [mailto:davidm@napali.hpl.hp.com]
> Sent: Friday, January 17, 2003 5:53 PM
> To: Siddha, Suresh B
> Cc: linux-ia64@linuxia64.org
> Subject: Re: [Linux-ia64] [Patch] Fix in process.c
> 
> 
> This one I REALLY don't like:
> 
> >>>>> On Fri, 17 Jan 2003 17:43:44 -0800, "Siddha, Suresh B" 
> <suresh.b.siddha@intel.com> said:
> 
>   Suresh> - extern char ia64_ret_from_clone;
>   Suresh> + extern void  ia64_ret_from_clone(void);
> 
>   Suresh> - child_stack->b0 = (unsigned long) &ia64_ret_from_clone;
>   Suresh> + child_stack->b0 = ((unsigned long *) 
> &ia64_ret_from_clone)[0];
> 
> Why materialize a function pointer for ABSOLUTELY no reason?
> Furthermore, &FUNC can be used as a static initializer, whereas
> ((long*)&FUNC)[0] cannot.
> 
> 	--david
> 
Received on Fri Jan 17 19:05:08 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:11 EST