user.h on powerpc

Carlos O'Donell carlos@codesourcery.com
Sat Mar 15 15:31:00 GMT 2008


Arkadiusz Miskiewicz wrote:
> Shouldn't user.h for ppc define these like it's in user.h
> for other architectures?
> 
> diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/user.h b/sysdeps/unix/sysv/linux/powerpc/sys/user.h
> index e8a8aaa..c738220 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/sys/user.h
> +++ b/sysdeps/unix/sysv/linux/powerpc/sys/user.h
> @@ -37,4 +37,10 @@ struct user {
>  	char		u_comm[32];		/* user command name */
>  };
>  
> +#define NBPG			PAGE_SIZE
> +#define UPAGES			1
> +#define HOST_TEXT_START_ADDR	(u.start_code)
> +#define HOST_DATA_START_ADDR	(u.start_data)
> +#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
> +
>  #endif  /* sys/user.h */
> 

The short answer is "No."

This header file should only be used by gdb. Nothing should be changed 
in user.h without consulting the gdb power maintainers.

Also note that you can't rely on user.h containing anything. For example 
on hppa-linux it is an empty file.

Cheers,
Carlos.
-- 
Carlos O'Donell
CodeSourcery
carlos@codesourcery.com
(650) 331-3385 x716



More information about the Libc-alpha mailing list