Просмотр исходного кода

libsanitizer: sys/user.h: remove obsolete BFD trad-core NBPG/UPAGES defines

The four installed sys/user.h headers in i386, nios2, ia64 and bfin
used:

    #include <bits/uClibc_page.h>
    #define NBPG                  PAGE_SIZE
    #define UPAGES                1
    #define HOST_TEXT_START_ADDR  (u.start_code)
    #define HOST_STACK_END_ADDR   (u.start_stack + u.u_ssize * NBPG)

These macros are only consumed by BFD's trad-core support, which is
irrelevant on modern ELF-coredump systems.  Glibc removed exactly
this block on microblaze and mips back in 2015 (BZ17791); follow
that precedent here.

With PAGE_SIZE no longer defined in <bits/uClibc_page.h> (see the
preceding patch "uClibc-ng: drop __pagesize, make _dl_pagesize the
single source of truth"), keeping the block would break the compile
of <sys/user.h> on the affected architectures.

The remaining per-arch sys/user.h files keep working unchanged: they
either define PAGE_SIZE/NBPG locally (microblaze, x86_64, m68k,
sparc, sparc64, sh) or rely on a per-arch bits/uClibc_page.h that
still defines PAGE_SIZE (alpha, mips, nds32).

Signed-off-by: Ramin Moussavi <ramin.moussavi@yacoub.de>
Ramin Moussavi 3 недель назад
Родитель
Сommit
62cb84000b

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

@@ -49,9 +49,5 @@ struct user {
 	unsigned long magic;	/* To uniquely identify a core file */
 	char u_comm[32];	/* User command that was responsible */
 };
-#define NBPG PAGE_SIZE
-#define UPAGES 1
-#define HOST_TEXT_START_ADDR (u.start_code)
-#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
 
 #endif

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

@@ -91,10 +91,4 @@ struct user
   int				u_debugreg [8];
 };
 
-#include <bits/uClibc_page.h>
-#define NBPG			PAGE_SIZE
-#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 */

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

@@ -44,10 +44,4 @@ 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 */

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

@@ -11,8 +11,6 @@
    Version 2.
  */
 
-#include <bits/uClibc_page.h>
-
 /* Core file format: The core file is written in such a way that gdb
    can understand it and provide useful information to the user (under
    linux we use the 'trad-core' bfd).  There are quite a number of
@@ -85,9 +83,4 @@ struct user {
 	char u_comm[32];		/* User command that was responsible */
 };
 
-#define NBPG PAGE_SIZE
-#define UPAGES 1
-#define HOST_TEXT_START_ADDR (u.start_code)
-#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
-
 #endif