Browse Source

sys/user.h: restore required macros

In commit 62cb84000b4db6209993ade213715483cfa616ac and
0357e28fe400b6a518cbd92f925081e640f5a3ed the macros were removed.
Unfortunately binutils 2.46.0 and gdbserver 17.2 still uses
traditional core format for some architectures, so cross-compilation
of both software packages fail for these architectures.

Restore the required macros.
NBPG is defined as getpagesize() when not defined in binutils libbfd,
so not required.

Tested for i386.
Waldemar Brodkorb 1 week ago
parent
commit
6f784d2ce2

+ 6 - 0
libc/sysdeps/linux/alpha/sys/user.h

@@ -39,4 +39,10 @@ struct user
   char u_comm[32];				/* user command name */
 };
 
+#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 */

+ 4 - 0
libc/sysdeps/linux/bfin/sys/user.h

@@ -50,4 +50,8 @@ struct user {
 	char u_comm[32];	/* User command that was responsible */
 };
 
+#define UPAGES			1
+#define HOST_TEXT_START_ADDR	(u.start_code)
+#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
+
 #endif

+ 5 - 0
libc/sysdeps/linux/i386/sys/user.h

@@ -91,4 +91,9 @@ struct user
   int				u_debugreg [8];
 };
 
+
+#define UPAGES			1
+#define HOST_TEXT_START_ADDR	(u.start_code)
+#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
+
 #endif	/* _SYS_USER_H */

+ 5 - 0
libc/sysdeps/linux/ia64/sys/user.h

@@ -44,4 +44,9 @@ struct user
   char u_comm[32];				/* User command name.  */
 };
 
+#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 */

+ 4 - 0
libc/sysdeps/linux/m68k/sys/user.h

@@ -83,4 +83,8 @@ struct user{
   char u_comm[32];		/* User command that was responsible */
 };
 
+#define UPAGES			1
+#define HOST_TEXT_START_ADDR	(u.start_code)
+#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
+
 #endif

+ 5 - 0
libc/sysdeps/linux/microblaze/sys/user.h

@@ -65,4 +65,9 @@ struct user
   int				u_debugreg [8];
 };
 
+#define UPAGES			1
+#define HOST_TEXT_START_ADDR	(u.start_code)
+#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
+
+
 #endif	/* _SYS_USER_H */

+ 5 - 0
libc/sysdeps/linux/mips/sys/user.h

@@ -206,4 +206,9 @@ struct user {
 
 #endif
 
+#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 */

+ 6 - 0
libc/sysdeps/linux/nds32/sys/user.h

@@ -73,4 +73,10 @@ struct user
   struct user_fpregs *u_fp0;	/* help gdb to find the FP registers. */
 };
 
+#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 */

+ 4 - 0
libc/sysdeps/linux/nios2/sys/user.h

@@ -83,4 +83,8 @@ struct user {
 	char u_comm[32];		/* User command that was responsible */
 };
 
+#define UPAGES			1
+#define HOST_TEXT_START_ADDR	(u.start_code)
+#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
+
 #endif

+ 5 - 0
libc/sysdeps/linux/sh/sys/user.h

@@ -79,4 +79,9 @@ struct user {
 	char		u_comm[32];		/* user command name */
 };
 
+#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 */

+ 2 - 0
libc/sysdeps/linux/sparc/sys/user.h

@@ -77,4 +77,6 @@ struct user {
   unsigned int  sigcode;
 };
 
+#define UPAGES	1
+
 #endif

+ 2 - 0
libc/sysdeps/linux/sparc64/sys/user.h

@@ -76,4 +76,6 @@ struct user {
   unsigned int  sigcode;
 };
 
+#define UPAGES	1
+
 #endif

+ 4 - 0
libc/sysdeps/linux/x86_64/sys/user.h

@@ -163,4 +163,8 @@ struct user
 };
 #endif  /* __WORDSIZE */
 
+#define UPAGES			1
+#define HOST_TEXT_START_ADDR	(u.start_code)
+#define HOST_STACK_END_ADDR	(u.start_stack + u.u_ssize * NBPG)
+
 #endif	/* _SYS_USER_H */