git: ee632fb9eb4a - main - lib{c,sys}: normalize export of openat, setcontext, and swapcontext

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Thu, 18 Apr 2024 13:58:37 UTC
The branch main has been updated by brooks:

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

commit ee632fb9eb4a060a4087a7f5425bfe36e65cda61
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2024-04-16 22:26:29 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-04-17 22:39:46 +0000

    lib{c,sys}: normalize export of openat, setcontext, and swapcontext
    
    List them in the symbol map rather than using the __sym_default to
    expose them.  This will allow later improvements in the stub
    implementations in libc.so.
    
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D44113
---
 lib/libc/sys/openat.c      | 1 -
 lib/libc/sys/setcontext.c  | 1 -
 lib/libc/sys/swapcontext.c | 1 -
 lib/libsys/Symbol.sys.map  | 4 ++++
 4 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/libc/sys/openat.c b/lib/libc/sys/openat.c
index 1cd8e7d90745..389360a5a9f5 100644
--- a/lib/libc/sys/openat.c
+++ b/lib/libc/sys/openat.c
@@ -37,7 +37,6 @@
 __weak_reference(__sys_openat, __openat);
 __sym_compat(openat, __impl_openat, FBSD_1.1);
 __weak_reference(openat, __impl_openat);
-__sym_default(openat, openat, FBSD_1.2);
 
 #pragma weak openat
 int
diff --git a/lib/libc/sys/setcontext.c b/lib/libc/sys/setcontext.c
index 96b5dc115067..301cca84c4f9 100644
--- a/lib/libc/sys/setcontext.c
+++ b/lib/libc/sys/setcontext.c
@@ -36,7 +36,6 @@
 __weak_reference(__sys_setcontext, __setcontext);
 __sym_compat(setcontext, __impl_setcontext, FBSD_1.0);
 __weak_reference(setcontext, __impl_setcontext);
-__sym_default(setcontext, setcontext, FBSD_1.2);
 
 #pragma weak setcontext
 int
diff --git a/lib/libc/sys/swapcontext.c b/lib/libc/sys/swapcontext.c
index b69a5b19e698..42793a516c70 100644
--- a/lib/libc/sys/swapcontext.c
+++ b/lib/libc/sys/swapcontext.c
@@ -38,7 +38,6 @@
 __weak_reference(__sys_swapcontext, __swapcontext);
 __sym_compat(swapcontext, __impl_swapcontext, FBSD_1.0);
 __weak_reference(swapcontext, __impl_swapcontext);
-__sym_default(swapcontext, swapcontext, FBSD_1.2);
 
 #pragma weak swapcontext
 int
diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map
index 822c007d32f1..359570c413a4 100644
--- a/lib/libsys/Symbol.sys.map
+++ b/lib/libsys/Symbol.sys.map
@@ -301,6 +301,8 @@ FBSD_1.2 {
 	cap_getmode;
 	getloginclass;
 	getpagesizes;
+	openat;
+	pdfork;
 	pdgetpid;
 	pdkill;
 	posix_fallocate;
@@ -309,7 +311,9 @@ FBSD_1.2 {
 	rctl_get_limits;
 	rctl_add_rule;
 	rctl_remove_rule;
+	setcontext;
 	setloginclass;
+	swapcontext;
 };
 
 FBSD_1.3 {