git: 1e2502bfca58 - main - libc: move MD sys related symbols to libsys

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 05 Feb 2024 20:38:36 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=1e2502bfca58344780747c3948b51164e25c8b5f

commit 1e2502bfca58344780747c3948b51164e25c8b5f
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-11-15 21:48:45 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-02-05 20:34:56 +0000

    libc: move MD sys related symbols to libsys
    
    This is a mix genuine MD interfaces and compat symbols like _getlogin.
    
    Reviewed by:    kib, emaste, imp
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/908
---
 lib/libc/amd64/Symbol.map           | 19 -------------------
 lib/libc/arm/Symbol.map             |  8 --------
 lib/libc/i386/Symbol.map            | 26 --------------------------
 lib/libc/powerpc/Symbol.map         |  5 -----
 lib/libc/powerpc64/Symbol.map       |  9 ---------
 lib/libsys/Makefile.sys             |  3 +++
 lib/libsys/amd64/Symbol.sys.map     | 28 ++++++++++++++++++++++++++++
 lib/libsys/arm/Symbol.sys.map       | 11 +++++++++++
 lib/libsys/i386/Symbol.sys.map      | 29 +++++++++++++++++++++++++++++
 lib/libsys/powerpc/Symbol.sys.map   |  8 ++++++++
 lib/libsys/powerpc64/Symbol.sys.map |  8 ++++++++
 11 files changed, 87 insertions(+), 67 deletions(-)

diff --git a/lib/libc/amd64/Symbol.map b/lib/libc/amd64/Symbol.map
index aa2744b15a74..2fc723102f90 100644
--- a/lib/libc/amd64/Symbol.map
+++ b/lib/libc/amd64/Symbol.map
@@ -13,20 +13,6 @@ FBSD_1.0 {
 	fpsetmask;
 	fpsetprec;
 	fpsetround;
-	rfork_thread;
-	amd64_get_fsbase;
-	amd64_get_gsbase;
-	amd64_set_fsbase;
-	amd64_set_gsbase;
-	brk;
-	sbrk;
-};
-
-FBSD_1.6 {
-	 x86_pkru_get_perm;
-	 x86_pkru_set_perm;
-	 x86_pkru_protect_range;
-	 x86_pkru_unprotect_range;
 };
 
 /*
@@ -35,14 +21,9 @@ FBSD_1.6 {
  *
  */
 FBSDprivate_1.0 {
-	/* PSEUDO syscalls */
-	_getlogin;
-
 	___longjmp;
 	__longjmp;
 	__signalcontext;
 	signalcontext;
 	__siglongjmp;
-	_brk;
-	_vfork;
 };
diff --git a/lib/libc/arm/Symbol.map b/lib/libc/arm/Symbol.map
index 6fef9598e7ef..ac5a7184b2a1 100644
--- a/lib/libc/arm/Symbol.map
+++ b/lib/libc/arm/Symbol.map
@@ -6,8 +6,6 @@
 FBSD_1.0 {
 	__mcount;
 	alloca;
-	brk;
-	sbrk;
 };
 
 FBSD_1.3 {
@@ -25,18 +23,12 @@ FBSD_1.6 {
 };
 
 FBSDprivate_1.0 {
-	/* PSEUDO syscalls */
-	_getlogin;
-
 	__aeabi_read_tp;
 	___longjmp;
 	__longjmp;
 	signalcontext;
 	_signalcontext;
 	__siglongjmp;
-	_vfork;
-	_brk;
-	_sbrk;
 
 	_libc_arm_fpu_present;
 };
diff --git a/lib/libc/i386/Symbol.map b/lib/libc/i386/Symbol.map
index 66939e2eb55d..270ba4b129a7 100644
--- a/lib/libc/i386/Symbol.map
+++ b/lib/libc/i386/Symbol.map
@@ -7,39 +7,13 @@ FBSD_1.0 {
 	.mcount;
 	alloca;
 	__flt_rounds;
-	rfork_thread;
-	brk;
-	i386_clr_watch;
-	i386_get_fsbase;
-	i386_get_gsbase;
-	i386_get_ioperm;
-	i386_get_ldt;
-	i386_set_fsbase;
-	i386_set_gsbase;
-	i386_set_ioperm;
-	i386_set_ldt;
-	i386_set_watch;
-	i386_vm86;
-	sbrk;
 	___tls_get_addr;
 };
 
-FBSD_1.6 {
-	 x86_pkru_get_perm;
-	 x86_pkru_set_perm;
-	 x86_pkru_protect_range;
-	 x86_pkru_unprotect_range;
-};
-
 FBSDprivate_1.0 {
-	/* PSEUDO syscalls */
-	_getlogin;
-
 	___longjmp;
 	__longjmp;
 	__signalcontext;
 	signalcontext;
 	__siglongjmp;
-	_vfork;
-	_brk;
 };
diff --git a/lib/libc/powerpc/Symbol.map b/lib/libc/powerpc/Symbol.map
index 5074596b3c09..0996b79369f3 100644
--- a/lib/libc/powerpc/Symbol.map
+++ b/lib/libc/powerpc/Symbol.map
@@ -11,8 +11,6 @@ FBSD_1.0 {
 	fpgetsticky;
 	fpsetmask;
 	fpsetround;
-	brk;
-	sbrk;
 };
 
 FBSD_1.3 {
@@ -20,9 +18,6 @@ FBSD_1.3 {
 };
 
 FBSDprivate_1.0 {
-	/* PSEUDO syscalls */
-	_getlogin;
-
 	_fpgetsticky;
 	__longjmp;
 	signalcontext;
diff --git a/lib/libc/powerpc64/Symbol.map b/lib/libc/powerpc64/Symbol.map
index 1bf990a52088..3a772922e2e3 100644
--- a/lib/libc/powerpc64/Symbol.map
+++ b/lib/libc/powerpc64/Symbol.map
@@ -11,17 +11,8 @@ FBSD_1.0 {
 	fpgetsticky;
 	fpsetmask;
 	fpsetround;
-	brk;
-	sbrk;
 };
 
 FBSDprivate_1.0 {
-	/* PSEUDO syscalls */
 	_getlogin;
-
-	_fpgetsticky;
-	__longjmp;
-	signalcontext;
-	__signalcontext;
-	__syncicache;
 };
diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys
index 880b0f7f08ed..e31a30d731bb 100644
--- a/lib/libsys/Makefile.sys
+++ b/lib/libsys/Makefile.sys
@@ -117,6 +117,9 @@ SPSEUDO= ${PSEUDO:S/.o/.S/}
 SRCS+=	${SASM} ${SPSEUDO}
 
 SYM_MAPS+=	${LIBSYS_SRCTOP}/Symbol.sys.map
+.if exists(${LIBSYS_SRCTOP}/${LIBC_ARCH}/Symbol.sys.map)
+SYM_MAPS+=	${LIBSYS_SRCTOP}/${LIBC_ARCH}/Symbol.sys.map
+.endif
 
 # Generated files
 CLEANFILES+=	${SASM} ${SPSEUDO}
diff --git a/lib/libsys/amd64/Symbol.sys.map b/lib/libsys/amd64/Symbol.sys.map
new file mode 100644
index 000000000000..6a531b659c46
--- /dev/null
+++ b/lib/libsys/amd64/Symbol.sys.map
@@ -0,0 +1,28 @@
+FBSD_1.0 {
+	rfork_thread;
+	amd64_get_fsbase;
+	amd64_get_gsbase;
+	amd64_set_fsbase;
+	amd64_set_gsbase;
+	brk;
+	sbrk;
+};
+
+FBSD_1.6 {
+	 x86_pkru_get_perm;
+	 x86_pkru_set_perm;
+	 x86_pkru_protect_range;
+	 x86_pkru_unprotect_range;
+};
+
+/*
+ *
+ * FreeBSD private ABI
+ *
+ */
+FBSDprivate_1.0 {
+	_getlogin;
+
+	_brk;
+	_vfork;
+};
diff --git a/lib/libsys/arm/Symbol.sys.map b/lib/libsys/arm/Symbol.sys.map
new file mode 100644
index 000000000000..89a57d68f81d
--- /dev/null
+++ b/lib/libsys/arm/Symbol.sys.map
@@ -0,0 +1,11 @@
+FBSD_1.0 {
+	brk;
+	sbrk;
+};
+
+FBSDprivate_1.0 {
+	_getlogin;
+	_vfork;
+	_brk;
+	_sbrk;
+};
diff --git a/lib/libsys/i386/Symbol.sys.map b/lib/libsys/i386/Symbol.sys.map
new file mode 100644
index 000000000000..c1b52b49c7a4
--- /dev/null
+++ b/lib/libsys/i386/Symbol.sys.map
@@ -0,0 +1,29 @@
+FBSD_1.0 {
+	rfork_thread;
+	brk;
+	i386_clr_watch;
+	i386_get_fsbase;
+	i386_get_gsbase;
+	i386_get_ioperm;
+	i386_get_ldt;
+	i386_set_fsbase;
+	i386_set_gsbase;
+	i386_set_ioperm;
+	i386_set_ldt;
+	i386_set_watch;
+	i386_vm86;
+	sbrk;
+};
+
+FBSD_1.6 {
+	 x86_pkru_get_perm;
+	 x86_pkru_set_perm;
+	 x86_pkru_protect_range;
+	 x86_pkru_unprotect_range;
+};
+
+FBSDprivate_1.0 {
+	_getlogin;
+	_vfork;
+	_brk;
+};
diff --git a/lib/libsys/powerpc/Symbol.sys.map b/lib/libsys/powerpc/Symbol.sys.map
new file mode 100644
index 000000000000..d79597c0b45e
--- /dev/null
+++ b/lib/libsys/powerpc/Symbol.sys.map
@@ -0,0 +1,8 @@
+FBSD_1.0 {
+	brk;
+	sbrk;
+};
+
+FBSDprivate_1.0 {
+	_getlogin;
+};
diff --git a/lib/libsys/powerpc64/Symbol.sys.map b/lib/libsys/powerpc64/Symbol.sys.map
new file mode 100644
index 000000000000..d79597c0b45e
--- /dev/null
+++ b/lib/libsys/powerpc64/Symbol.sys.map
@@ -0,0 +1,8 @@
+FBSD_1.0 {
+	brk;
+	sbrk;
+};
+
+FBSDprivate_1.0 {
+	_getlogin;
+};