Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Apr 2019 00:59:59 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r346939 - stable/12/lib/libc/gen
Message-ID:  <201904300059.x3U0xxkn048349@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Tue Apr 30 00:59:59 2019
New Revision: 346939
URL: https://svnweb.freebsd.org/changeset/base/346939

Log:
  MFC r346751:
  
  Add a manpage for elf_aux_info(3)

Added:
  stable/12/lib/libc/gen/auxv.3
     - copied unchanged from r346751, head/lib/libc/gen/auxv.3
Modified:
  stable/12/lib/libc/gen/Makefile.inc
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/lib/libc/gen/Makefile.inc
==============================================================================
--- stable/12/lib/libc/gen/Makefile.inc	Tue Apr 30 00:58:43 2019	(r346938)
+++ stable/12/lib/libc/gen/Makefile.inc	Tue Apr 30 00:59:59 2019	(r346939)
@@ -193,6 +193,7 @@ SYM_MAPS+=${LIBC_SRCTOP}/gen/Symbol.map
 
 MAN+=	alarm.3 \
 	arc4random.3 \
+	auxv.3 \
 	basename.3 \
 	cap_rights_get.3 \
 	cap_sandboxed.3 \
@@ -321,6 +322,7 @@ 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+=devname.3 devname_r.3
 MLINKS+=devname.3 fdevname.3

Copied: stable/12/lib/libc/gen/auxv.3 (from r346751, head/lib/libc/gen/auxv.3)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/12/lib/libc/gen/auxv.3	Tue Apr 30 00:59:59 2019	(r346939, copy of r346751, head/lib/libc/gen/auxv.3)
@@ -0,0 +1,86 @@
+.\"
+.\" Copyright (c) 2019 Ian Lepore <ian@freebsd.org>
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\"
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd April 25, 2019
+.Dt ELF_AUX_INFO 3
+.Os
+.Sh NAME
+.Nm elf_aux_info
+.Nd extract data from the elf auxiliary vector of the current process
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In sys/auxv.h
+.Ft int
+.Fn elf_aux_info "int aux" "void *buf" "int buflen"
+.Sh DESCRIPTION
+The
+.Fn elf_aux_info
+function retrieves the auxiliary info vector requested in
+.Va aux .
+The information is stored into the provided buffer if it will fit.
+The following values, defined in
+.In sys/elf_common.h
+can be requested:
+.Bl -tag -width AT_OSRELDATE
+.It AT_CANARY
+The canary value for SSP.
+.It AT_HWCAP
+CPU / hardware feature flags.
+.It AT_HWCAP2
+CPU / hardware feature flags.
+.It AT_NCPUS
+Number of CPUs.
+.It AT_OSRELDATE
+Kernel OSRELDATE.
+.It AT_PAGESIZES
+Vector of page sizes.
+.It AT_PAGESZ
+Page size in bytes.
+.It AT_TIMEKEEP
+Pointer to VDSO timehands (for library internal use).
+.El
+.Sh RETURN VALUES
+Returns zero on success, or an error number on failure.
+.Sh ERRORS
+.Bl -tag -width Er
+.It Bq Er EINVAL
+An unknown item was requested.
+.It Bq Er EINVAL
+The provided buffer was not the right size for the requested item.
+.It Bq Er ENOENT
+The requested item is not available.
+.El
+.Sh HISTORY
+The
+.Fn elf_aux_info
+function appeared in
+.Fx 12.0 .
+.Sh BUGS
+Only a small subset of available auxiliary info vector items are
+accessible with this function.
+Some items require a "right-sized" buffer while others just require a
+"big enough" buffer.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904300059.x3U0xxkn048349>