git: 4c33415e4cf5 - main - libc: elf auxiliary vector handling to libsys

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

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

commit 4c33415e4cf52c075046569000d92032496978fb
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2023-11-15 20:53:28 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2024-02-05 20:34:56 +0000

    libc: elf auxiliary vector handling to libsys
    
    This is part of the interface to the kernel and some syscall wrappers
    depend on it so move it there.
    
    Reviewed by:    kib, emaste, imp
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/908
---
 lib/libc/gen/Makefile.inc       | 3 ---
 lib/libc/gen/Symbol.map         | 2 --
 lib/libsys/Makefile.sys         | 4 ++++
 lib/libsys/Symbol.sys.map       | 3 +++
 lib/{libc/gen => libsys}/auxv.3 | 0
 lib/{libc/gen => libsys}/auxv.c | 0
 6 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index ae5a12d8b668..64b3e99ec6c0 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -18,7 +18,6 @@ SRCS+=	__getosreldate.c \
 	arc4random-compat.c \
 	arc4random_uniform.c \
 	assert.c \
-	auxv.c \
 	basename.c \
 	basename_compat.c \
 	cap_sandboxed.c \
@@ -197,7 +196,6 @@ SYM_MAPS+=${LIBC_SRCTOP}/gen/Symbol.map
 
 MAN+=	alarm.3 \
 	arc4random.3 \
-	auxv.3 \
 	basename.3 \
 	cap_rights_get.3 \
 	cap_sandboxed.3 \
@@ -324,7 +322,6 @@ MAN+=	alarm.3 \
 
 MLINKS+=arc4random.3 arc4random_buf.3 \
 	arc4random.3 arc4random_uniform.3
-MLINKS+=auxv.3 elf_aux_info.3
 MLINKS+=ctermid.3 ctermid_r.3
 MLINKS+=daemon.3 daemonfd.3
 MLINKS+=devname.3 devname_r.3
diff --git a/lib/libc/gen/Symbol.map b/lib/libc/gen/Symbol.map
index ee23d6112e44..73b0f58e5f26 100644
--- a/lib/libc/gen/Symbol.map
+++ b/lib/libc/gen/Symbol.map
@@ -404,7 +404,6 @@ FBSD_1.5 {
 	devname;
 	devname_r;
 	dirname;
-	elf_aux_info;
 	fts_children;
 	fts_close;
 	fts_get_clientptr;
@@ -582,7 +581,6 @@ FBSDprivate_1.0 {
 
 	__libc_tcdrain;
 
-	__elf_aux_vector;
 	__pthread_distribute_static_tls;
 	__pthread_map_stacks_exec;
 	__fillcontextx;
diff --git a/lib/libsys/Makefile.sys b/lib/libsys/Makefile.sys
index ef800e4d2445..e8db2a585ce4 100644
--- a/lib/libsys/Makefile.sys
+++ b/lib/libsys/Makefile.sys
@@ -44,6 +44,8 @@ SRCS+=	recv.c recvmmsg.c send.c sendmmsg.c
 NOASM+=  sched_getcpu.o
 PSEUDO+= _sched_getcpu.o
 
+SRCS+= auxv.c
+
 SRCS+= brk.c
 SRCS+= closefrom.c
 SRCS+= pipe.c
@@ -166,6 +168,7 @@ MAN+=	abort2.2 \
 	aio_suspend.2 \
 	aio_waitcomplete.2 \
 	aio_write.2 \
+	auxv.3 \
 	bind.2 \
 	bindat.2 \
 	brk.2 \
@@ -378,6 +381,7 @@ MLINKS+=aio_write.2 aio_writev.2
 MLINKS+=accept.2 accept4.2
 MLINKS+=access.2 eaccess.2 \
 	access.2 faccessat.2
+MLINKS+=auxv.3 elf_aux_info.3
 MLINKS+=brk.2 sbrk.2
 MLINKS+=cap_enter.2 cap_getmode.2
 MLINKS+=cap_fcntls_limit.2 cap_fcntls_get.2
diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map
index 3b207e59fec6..17731304d311 100644
--- a/lib/libsys/Symbol.sys.map
+++ b/lib/libsys/Symbol.sys.map
@@ -378,6 +378,7 @@ FBSD_1.4 {
 
 FBSD_1.5 {
 	clock_nanosleep;
+	elf_aux_info;
 	fdatasync;
 	fhstat;
 	fhstatfs;
@@ -1049,10 +1050,12 @@ FBSDprivate_1.0 {
 	__sys_writev;
 
 	/* Things that aren't system calls (in sort(1) order) */
+	__elf_aux_vector;
 	__libc_sigwait;
 	__libsys_interposing_slot;
 	__set_error_selector;
 	__sigwait;
+	_elf_aux_info;
 	gssd_syscall;
 	nlm_syscall;
 	rpctls_syscall;
diff --git a/lib/libc/gen/auxv.3 b/lib/libsys/auxv.3
similarity index 100%
rename from lib/libc/gen/auxv.3
rename to lib/libsys/auxv.3
diff --git a/lib/libc/gen/auxv.c b/lib/libsys/auxv.c
similarity index 100%
rename from lib/libc/gen/auxv.c
rename to lib/libsys/auxv.c