Module Name: src
Committed By: jkoshy
Date: Sat Mar 12 21:37:55 UTC 2022
Modified Files:
src/external/bsd/elftoolchain/dist/libelf: elf_begin.3 elf_cntl.3
elf_end.3 elf_errmsg.3 elf_flagdata.3 elf_getarhdr.3 elf_getarsym.3
elf_getbase.3 elf_getdata.3 elf_getident.3 elf_getphdrnum.3
elf_getphnum.3 elf_getscn.3 elf_getshdrnum.3 elf_getshdrstrndx.3
elf_getshnum.3 elf_getshstrndx.3 elf_hash.3 elf_kind.3 elf_memory.3
elf_next.3 elf_open.3 elf_rand.3 elf_rawfile.3 elf_strptr.3
elf_update.3 elf_version.3 gelf_checksum.3 gelf_fsize.3
gelf_getcap.3 gelf_getclass.3 gelf_getdyn.3 gelf_getehdr.3
gelf_getmove.3 gelf_getphdr.3 gelf_getrel.3 gelf_getrela.3
gelf_getshdr.3 gelf_getsym.3 gelf_getsyminfo.3 gelf_getsymshndx.3
gelf_newehdr.3 gelf_newphdr.3 gelf_update_ehdr.3 gelf_xlatetof.3
Log Message:
Sync libelf's manual pages with upstream [r3963].
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/bsd/elftoolchain/dist/libelf/elf_begin.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_cntl.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_end.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_errmsg.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_flagdata.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getarhdr.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getarsym.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getbase.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getdata.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getident.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getphdrnum.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getphnum.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getscn.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getshdrnum.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getshdrstrndx.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getshnum.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_getshstrndx.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_hash.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_kind.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_memory.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_next.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_open.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_rand.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_strptr.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_update.3 \
src/external/bsd/elftoolchain/dist/libelf/elf_version.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getcap.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getdyn.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getehdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getmove.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getphdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getrel.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getrela.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getshdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getsym.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getsyminfo.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_getsymshndx.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_newehdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_newphdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_update_ehdr.3 \
src/external/bsd/elftoolchain/dist/libelf/gelf_xlatetof.3
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/elftoolchain/dist/libelf/elf_begin.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_begin.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_begin.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_begin.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_begin.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_begin.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_begin.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008-2011 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_begin.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_begin.3 3952 2022-03-12 09:09:50Z jkoshy
.\"
.Dd December 11, 2011
.Dt ELF_BEGIN 3
@@ -54,22 +54,22 @@ and
APIs.
.Pp
Argument
-.Ar fd
+.Fa fd
is an open file descriptor returned from an
.Xr open 2
system call.
Function
.Fn elf_begin
uses argument
-.Ar fd
+.Fa fd
for reading or writing depending on the value of argument
-.Ar cmd .
+.Fa cmd .
Argument
-.Ar elf
+.Fa elf
is primarily used for iterating through archives.
.Pp
The argument
-.Ar cmd
+.Fa cmd
can have the following values:
.Bl -tag -width "ELF_C_WRITE"
.It ELF_C_NULL
@@ -78,46 +78,46 @@ Causes
to return
.Dv NULL .
Arguments
-.Ar fd
+.Fa fd
and
-.Ar elf
+.Fa elf
are ignored, and no additional error is signalled.
.It ELF_C_READ
This value is to be when the application wishes to examine (but not
modify) the contents of the file specified by the arguments
-.Ar fd
+.Fa fd
and
-.Ar elf .
+.Fa elf .
It can be used for both
.Xr ar 1
archives and for ELF objects.
.Pp
If argument
-.Ar elf
+.Fa elf
is
.Dv NULL ,
the library will allocate a new ELF descriptor for the file
being processed.
The argument
-.Ar fd
+.Fa fd
should have been opened for reading.
.Pp
If argument
-.Ar elf
+.Fa elf
is not
.Dv NULL ,
and references a regular ELF file previously opened with
.Fn elf_begin ,
then the activation count for the descriptor referenced by argument
-.Ar elf
+.Fa elf
is incremented.
The value in argument
-.Ar fd
+.Fa fd
should match that used to open the descriptor argument
-.Ar elf .
+.Fa elf .
.Pp
If argument
-.Ar elf
+.Fa elf
is not
.Dv NULL ,
and references a descriptor for an
@@ -129,11 +129,11 @@ described in the section
.Sx "Processing ar(1) archives"
below.
The value for argument
-.Ar fd
+.Fa fd
should match that used to open the archive earlier.
.Pp
If argument
-.Ar elf
+.Fa elf
is not
.Dv NULL ,
and references an
@@ -141,7 +141,7 @@ and references an
archive opened earlier with
.Fn elf_memory ,
then the value of the argument
-.Ar fd
+.Fa fd
is ignored.
.It Dv ELF_C_RDWR
This command is used to prepare an ELF file for reading and writing.
@@ -150,25 +150,25 @@ This command is not supported for
archives.
.Pp
Argument
-.Ar fd
+.Fa fd
should have been opened for reading and writing.
If argument
-.Ar elf
+.Fa elf
is
.Dv NULL ,
the library will allocate a new ELF descriptor for
the file being processed.
If the argument
-.Ar elf
+.Fa elf
is non-null, it should point to a descriptor previously
allocated with
.Fn elf_begin
with the same values for arguments
-.Ar fd
+.Fa fd
and
-.Ar cmd ;
+.Fa cmd ;
in this case the library will increment the activation count for descriptor
-.Ar elf
+.Fa elf
and return the same descriptor.
.Pp
Changes to the in-memory image of the ELF file may be written back to
@@ -179,19 +179,19 @@ function.
This command is used when the application wishes to create a new ELF
file.
Argument
-.Ar fd
+.Fa fd
should have been opened for writing.
Argument
-.Ar elf
+.Fa elf
is ignored, and the previous contents of file referenced by argument
-.Ar fd
+.Fa fd
are overwritten.
.El
.Ss Processing ar(1) archives
An
.Xr ar 1
archive may be opened in read mode (with argument
-.Ar cmd
+.Fa cmd
set to
.Dv ELF_C_READ )
using
@@ -258,53 +258,53 @@ can fail with the following errors:
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARCHIVE
The archive denoted by argument
-.Ar elf
+.Fa elf
could not be parsed.
.It Bq Er ELF_E_ARGUMENT
The value in argument
-.Ar cmd
+.Fa cmd
was unrecognized.
.It Bq Er ELF_E_ARGUMENT
A non-null value for argument
-.Ar elf
+.Fa elf
was specified when
-.Ar cmd
+.Fa cmd
was set to
.Dv ELF_C_RDWR .
.It Bq Er ELF_E_ARGUMENT
The value of argument
-.Ar fd
+.Fa fd
differs from the one the ELF descriptor
-.Ar elf
+.Fa elf
was created with.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar cmd
+.Fa cmd
differs from the value specified when ELF descriptor
-.Ar elf
+.Fa elf
was created.
.It Bq Er ELF_E_ARGUMENT
An
.Xr ar 1
archive was opened with
-.Ar cmd
+.Fa cmd
set to
.Dv ELF_C_RDWR .
.It Bq Er ELF_E_ARGUMENT
The file referenced by argument
-.Ar fd
+.Fa fd
was empty.
.It Bq Er ELF_E_ARGUMENT
The underlying file for argument
-.Ar fd
+.Fa fd
was of an unsupported type.
.It Bq Er ELF_E_IO
The file descriptor in argument
-.Ar fd
+.Fa fd
was invalid.
.It Bq Er ELF_E_IO
The file descriptor in argument
-.Ar fd
+.Fa fd
could not be read or written to.
.It Bq Er ELF_E_RESOURCE
An out of memory condition was encountered.
@@ -315,7 +315,7 @@ was called before a working version was
.Xr elf_version 3 .
.It Bq Er ELF_E_VERSION
The ELF object referenced by argument
-.Ar fd
+.Fa fd
was of an unsupported ELF version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/elf_cntl.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_cntl.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_cntl.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_cntl.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_cntl.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_cntl.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_cntl.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_cntl.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_cntl.3 3953 2022-03-12 09:57:05Z jkoshy
.\"
.Dd August 9, 2006
.Dt ELF_CNTL 3
@@ -42,34 +42,34 @@ Function
.Fn elf_cntl
controls the ELF library's subsequent use of the file descriptor
used to create ELF descriptor
-.Ar elf .
+.Fa elf .
.Pp
Argument
-.Ar cmd
+.Fa cmd
informs the library of the action to be taken:
.Bl -tag -width "ELF_C_FDDONE"
.It Dv ELF_C_FDDONE
This value instructs the ELF library not to perform any further
I/O on the file descriptor associated with argument
-.Ar elf .
+.Fa elf .
For ELF descriptors opened with mode
-.Ar ELF_C_WRITE
+.Dv ELF_C_WRITE
or
-.Ar ELF_C_RDWR
+.Dv ELF_C_RDWR
subsequent
.Fn elf_update
operations on the descriptor will fail.
.It Dv ELF_C_FDREAD
This value instructs the ELF library to read in all necessary
data associated with ELF descriptor
-.Ar elf
+.Fa elf
into memory so that the underlying file descriptor can be
safely closed with command
.Dv ELF_C_FDDONE .
.El
.Pp
Argument
-.Ar elf
+.Fa elf
must be an ELF descriptor associated with a file system object
(e.g., an
.Xr ar 1
@@ -88,16 +88,16 @@ returns 0 on success, or -1 if an error
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARCHIVE
Argument
-.Ar elf
+.Fa elf
is a descriptor for an archive member.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar cmd
+.Fa cmd
was not recognized.
.It Bq Er ELF_E_MODE
An
Index: src/external/bsd/elftoolchain/dist/libelf/elf_end.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_end.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_end.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_end.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_end.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_end.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_end.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_end.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_end.3 3954 2022-03-12 12:07:16Z jkoshy
.\"
.Dd June 29, 2006
.Dt ELF_END 3
@@ -42,7 +42,7 @@ Function
.Fn elf_end
is used to release the resources associated with an ELF descriptor
pointed to by argument
-.Ar elf .
+.Fa elf .
This descriptor must have been allocated by a previous call to
.Xr elf_begin 3
or
@@ -50,12 +50,12 @@ or
For programming convenience, a
.Dv NULL
value is permitted for argument
-.Ar elf .
+.Fa elf .
.Pp
A call to
.Fn elf_end
decrements the activation count for descriptor
-.Ar elf
+.Fa elf
by one.
The resources associated with the descriptor are only released
with its activation count goes to zero.
@@ -63,15 +63,15 @@ with its activation count goes to zero.
Once function
.Fn elf_end
returns zero, the ELF descriptor
-.Ar elf
+.Fa elf
will no longer be valid and should not be used further.
.Sh RETURN VALUES
Function
.Fn elf_end
returns the current value of the ELF descriptor
-.Ar elf Ap s
+.Fa elf Ap s
activation count, or zero if argument
-.Ar elf
+.Fa elf
was
.Dv NULL .
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/elf_errmsg.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_errmsg.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_errmsg.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_errmsg.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_errmsg.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_errmsg.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_errmsg.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_errmsg.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_errmsg.3 3954 2022-03-12 12:07:16Z jkoshy
.\"
.Dd June 11, 2006
.Dt ELF_ERRMSG 3
@@ -58,9 +58,9 @@ The function
.Fn elf_errmsg
returns a null-terminated string with a human readable
description of the error specified in argument
-.Ar error .
+.Fa error .
A zero value for argument
-.Ar error
+.Fa error
retrieves the most recent error encountered by the ELF
library.
An argument value of -1 behaves identically, except that
@@ -78,7 +78,7 @@ Function
.Fn elf_errmsg
returns a pointer to library local storage for non-zero values
of argument
-.Ar error .
+.Fa error .
With a zero argument, the function will return a
.Dv NULL
pointer if no
Index: src/external/bsd/elftoolchain/dist/libelf/elf_flagdata.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_flagdata.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_flagdata.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_flagdata.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_flagdata.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_flagdata.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_flagdata.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006-2008,2011 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_flagdata.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_flagdata.3 3954 2022-03-12 12:07:16Z jkoshy
.\"
.Dd June 12, 2019
.Dt ELF_FLAGDATA 3
@@ -60,11 +60,11 @@ These functions are used to query, set o
structures associated with an ELF file.
.Pp
Arguments
-.Ar arhdr ,
-.Ar data ,
-.Ar elf
+.Fa arhdr ,
+.Fa data ,
+.Fa elf
and
-.Ar scn
+.Fa scn
denote the data structures whose flags need to be changed.
These values should have been returned by prior calls to
functions in the
@@ -73,12 +73,12 @@ API set:
.Bl -bullet -compact
.It
Argument
-.Ar arhdr
+.Fa arhdr
should have been returned by a prior call to
.Xr elf_getarhdr 3 .
.It
Argument
-.Ar data
+.Fa data
should have been returned by a prior call to one of
.Xr elf_newdata 3 ,
.Xr elf_getdata 3
@@ -86,14 +86,14 @@ or
.Xr elf_rawdata 3 .
.It
Argument
-.Ar elf
+.Fa elf
should have been allocated by a prior call to one of
.Xr elf_begin 3
or
.Xr elf_memory 3 .
.It
Argument
-.Ar scn
+.Fa scn
should have been returned by a prior call to one of
.Xr elf_getscn 3 ,
.Xr elf_newscn 3
@@ -105,21 +105,21 @@ These values are allowed to be
to simplify error handling in application code.
.Pp
Argument
-.Ar cmd
+.Fa cmd
may have the following values:
.Bl -tag -width ELF_C_SET
.It Dv ELF_C_CLR
The argument
-.Ar flags
+.Fa flags
specifies the flags to be cleared.
.It Dv ELF_C_SET
The argument
-.Ar flags
+.Fa flags
specifies the flags to be set.
.El
.Pp
The argument
-.Ar flags
+.Fa flags
is allowed to have the following flags set:
.Bl -tag -width ELF_F_ARCHIVE_SYSV
.It Dv ELF_F_ARCHIVE
@@ -130,7 +130,7 @@ It informs the library that the applicat
.Xr ar 1
archive.
Argument
-.Ar elf
+.Fa elf
should have been opened for writing using the
.Dv ELF_C_WRITE
command to function
@@ -160,14 +160,14 @@ Marking a given data structure as
.Dq dirty
affects all of its contained elements.
Thus marking an ELF descriptor
-.Ar elf
+.Fa elf
with
.Fn elf_flagelf "elf" "ELF_C_SET" "ELF_F_DIRTY"
means that the entire contents of the descriptor are
.Dq dirty .
.Pp
Using a value of zero for argument
-.Ar flags
+.Fa flags
will return the current set of flags for the data structure being
queried.
.Sh RETURN VALUES
@@ -188,15 +188,15 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
An unsupported value was used for the
-.Ar cmd
+.Fa cmd
argument.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar flags
+.Fa flags
had unsupported flags set.
.It Bq Er ELF_E_ARGUMENT
The argument
-.Ar elf
+.Fa elf
was not a descriptor for an ELF object.
.It Bq Er ELF_E_MODE
The
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getarhdr.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getarhdr.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getarhdr.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getarhdr.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getarhdr.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getarhdr.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getarhdr.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getarhdr.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getarhdr.3 3955 2022-03-12 12:24:36Z jkoshy
.\"
.Dd August 15, 2006
.Dt ELF_GETARHDR 3
@@ -42,7 +42,7 @@ The
.Fn elf_getarhdr
function returns a pointer to an archive member header for
a descriptor
-.Ar elf .
+.Fa elf .
This descriptor must have been returned by a prior call to
.Xr elf_begin 3 ,
and must be a descriptor for a member inside an
@@ -85,12 +85,12 @@ may fail with the following errors:
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not a descriptor for a member of an
.Xr ar 1
archive.
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getarsym.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getarsym.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getarsym.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getarsym.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getarsym.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getarsym.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getarsym.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getarsym.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getarsym.3 3955 2022-03-12 12:24:36Z jkoshy
.\"
.Dd August 15, 2006
.Dt ELF_GETARSYM 3
@@ -45,7 +45,7 @@ retrieves the symbol table for an
archive, if one is available.
.Pp
Argument
-.Ar elf
+.Fa elf
should be a descriptor for an
.Xr ar 1
archive opened using
@@ -54,7 +54,7 @@ or
.Fn elf_memory .
.Pp
If the archive
-.Ar elf
+.Fa elf
contains a symbol table with n entries, this function returns a
pointer to an array of n+1
.Vt Elf_Arsym
@@ -86,7 +86,7 @@ and an illegal value of ~0UL for
.Va as_hash .
.Pp
If argument
-.Ar ptr
+.Fa ptr
is non-null, the
.Fn elf_getarsym
function will store the number of table entries returned (including the
@@ -101,12 +101,12 @@ structures if successful, or a
pointer if an error was encountered.
.Pp
If argument
-.Ar ptr
+.Fa ptr
is non-null and there was no error, the library will store the
number of archive symbol entries returned into the location it
points to.
If argument
-.Ar ptr
+.Fa ptr
is non-null and an error was encountered, the library will
set the location pointed to by it to zero.
.Sh ERRORS
@@ -116,12 +116,12 @@ may fail with the following errors:
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not a descriptor for an
.Xr ar 1
archive.
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getbase.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getbase.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getbase.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getbase.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getbase.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getbase.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getbase.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008,2010 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getbase.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getbase.3 3955 2022-03-12 12:24:36Z jkoshy
.\"
.Dd June 6, 2010
.Dt ELF_GETBASE 3
@@ -42,7 +42,7 @@ Function
.Fn elf_getbase
returns the file offset to the first byte of the object referenced by ELF
descriptor
-.Ar elf .
+.Fa elf .
.Pp
For descriptors referencing members of archives, the returned offset is
the file offset of the member in its containing archive.
@@ -62,7 +62,7 @@ may fail with the following errors:
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was
.Dv NULL .
.El
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getdata.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getdata.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getdata.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getdata.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getdata.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getdata.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getdata.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008,2010-2011 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getdata.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getdata.3 3955 2022-03-12 12:24:36Z jkoshy
.\"
.Dd April 22, 2019
.Dt ELF_GETDATA 3
@@ -52,22 +52,22 @@ Data descriptors used by the ELF library
Function
.Fn elf_getdata
will return the next data descriptor associated with section descriptor
-.Ar scn .
+.Fa scn .
The returned data descriptor will be setup to contain translated data.
Argument
-.Ar data
+.Fa data
may be
.Dv NULL ,
in which case the function returns the first data descriptor
associated with section
-.Ar scn .
+.Fa scn .
If argument
-.Ar data
+.Fa data
is not
.Dv NULL ,
it must be a pointer to a data descriptor associated with
section descriptor
-.Ar scn ,
+.Fa scn ,
and function
.Fn elf_getdata
will return a pointer to the next data descriptor for the section,
@@ -79,7 +79,7 @@ Function
.Fn elf_newdata
will allocate a new data descriptor and append it to the list of data
descriptors associated with section descriptor
-.Ar scn .
+.Fa scn .
The new data descriptor will be initialized as follows:
.Bl -tag -width "d_version" -compact -offset indent
.It Va d_align
@@ -105,13 +105,13 @@ The application must set these values as
calling
.Xr elf_update 3 .
Section
-.Ar scn
+.Fa scn
must be associated with an ELF file opened for writing.
If the application has not requested full control of layout by
setting the
.Dv ELF_F_LAYOUT
flag on descriptor
-.Ar elf ,
+.Fa elf ,
then the data referenced by the returned descriptor will be positioned
after the existing content of the section, honoring the file alignment
specified in member
@@ -119,7 +119,7 @@ specified in member
On successful completion of a call to
.Fn elf_newdata ,
the ELF library will mark the section
-.Ar scn
+.Fa scn
as
.Dq dirty .
.Pp
@@ -127,24 +127,24 @@ Function
.Fn elf_rawdata
is used to step through the data descriptors associated with
section
-.Ar scn .
+.Fa scn .
In contrast to function
.Fn elf_getdata ,
this function returns untranslated data.
If argument
-.Ar data
+.Fa data
is
.Dv NULL ,
the first data descriptor associated with section
-.Ar scn
+.Fa scn
is returned.
If argument
-.Ar data
+.Fa data
is not
.Dv NULL ,
is must be a data descriptor associated with
section
-.Ar scn ,
+.Fa scn ,
and function
.Fn elf_rawdata
will return the next data descriptor in the list, or
@@ -196,19 +196,19 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Either of the arguments
-.Ar scn
+.Fa scn
or
-.Ar data
+.Fa data
was
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
The data descriptor referenced by argument
-.Ar data
+.Fa data
is not associated with section descriptor
-.Ar scn .
+.Fa scn .
.It Bq Er ELF_E_ARGUMENT
The section denoted by argument
-.Ar scn
+.Fa scn
had no data associated with it.
.It Bq Er ELF_E_DATA
Retrieval of data from the underlying object failed.
@@ -216,28 +216,28 @@ Retrieval of data from the underlying ob
An out of memory condition was detected.
.It Bq Er ELF_E_SECTION
Section
-.Ar scn
+.Fa scn
had type
.Dv SHT_NULL .
.It Bq Er ELF_E_SECTION
The type of the section
-.Ar scn
+.Fa scn
was not recognized by the library.
.It Bq Er ELF_E_SECTION
The size of the section
-.Ar scn
+.Fa scn
is not a multiple of the file size for its section type.
.It Bq Er ELF_E_SECTION
The file offset for section
-.Ar scn
+.Fa scn
is incorrect.
.It Bq Er ELF_E_UNIMPL
The section type associated with section
-.Ar scn
+.Fa scn
is not supported.
.It Bq Er ELF_E_VERSION
Section
-.Ar scn
+.Fa scn
was associated with an ELF object with an unsupported
version.
.El
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getident.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getident.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getident.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getident.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getident.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getident.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getident.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getident.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getident.3 3956 2022-03-12 12:39:30Z jkoshy
.\"
.Dd July 3, 2006
.Dt ELF_GETIDENT 3
@@ -41,13 +41,13 @@
Function
.Fn elf_getident
returns a pointer to the initial bytes of the file for descriptor
-.Ar elf .
+.Fa elf .
.Pp
If argument
-.Ar sz
+.Fa sz
is non-null, the size of the identification area returned is written
to the location pointed to by
-.Ar sz .
+.Fa sz .
This location is set to zero on errors.
.Sh RETURN VALUES
Function
@@ -66,10 +66,10 @@ can fail with the following errors:
A
.Dv NULL
value was passed in for argument
-.Ar elf .
+.Fa elf .
.It Bq Er ELF_E_SEQUENCE
ELF descriptor
-.Ar elf
+.Fa elf
was opened for writing and function
.Fn elf_getident
was called before a call to
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getphdrnum.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getphdrnum.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getphdrnum.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getphdrnum.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getphdrnum.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getphdrnum.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getphdrnum.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getphdrnum.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getphdrnum.3 3956 2022-03-12 12:39:30Z jkoshy
.\"
.Dd July 25, 2018
.Dt ELF_GETPHDRNUM 3
@@ -41,9 +41,9 @@
Function
.Fn elf_getphdrnum
retrieves the number of ELF program headers associated with descriptor
-.Ar elf
+.Fa elf
and stores it into the location pointed to by argument
-.Ar phnum .
+.Fa phnum .
.Pp
This routine allows applications to uniformly process both normal ELF
objects and ELF objects that use extended numbering.
@@ -60,18 +60,18 @@ can fail with the following errors:
A
.Dv NULL
value was passed in for argument
-.Ar elf .
+.Fa elf .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not for an ELF file.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
lacks an ELF Executable Header.
.It Bq Er ELF_E_HEADER
The ELF Executable Header associated with argument
-.Ar elf
+.Fa elf
was corrupt.
.It Bq Er ELF_E_SECTION
The section header at index
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getphnum.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getphnum.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getphnum.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getphnum.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getphnum.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getphnum.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getphnum.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getphnum.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getphnum.3 3956 2022-03-12 12:39:30Z jkoshy
.\"
.Dd August 5, 2009
.Dt ELF_GETPHNUM 3
@@ -46,9 +46,9 @@ instead.
Function
.Fn elf_getphnum
retrieves the number of ELF program headers associated with descriptor
-.Ar elf
+.Fa elf
and stores it into the location pointed to by argument
-.Ar phnum .
+.Fa phnum .
.Pp
This routine allows applications to uniformly process both normal ELF
objects and ELF objects that use extended numbering.
@@ -66,18 +66,18 @@ can fail with the following errors:
A
.Dv NULL
value was passed in for argument
-.Ar elf .
+.Fa elf .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not for an ELF file.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
lacks an ELF Executable Header.
.It Bq Er ELF_E_HEADER
The ELF Executable Header associated with argument
-.Ar elf
+.Fa elf
was corrupt.
.It Bq Er ELF_E_SECTION
The section header at index
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getscn.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getscn.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getscn.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getscn.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getscn.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getscn.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getscn.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006-2008,2018 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getscn.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getscn.3 3956 2022-03-12 12:39:30Z jkoshy
.\"
.Dd September 24, 2018
.Dt ELF_GETSCN 3
@@ -53,26 +53,26 @@ with an ELF descriptor.
Function
.Fn elf_getscn
will return a section descriptor for the section at index
-.Ar index
+.Fa index
in the object denoted by ELF descriptor
-.Ar elf .
+.Fa elf .
An error will be signalled if the specified section does not
exist.
.Pp
Function
.Fn elf_ndxscn
returns the section table index associated with section descriptor
-.Ar scn .
+.Fa scn .
.Pp
Function
.Fn elf_newscn
creates a new section and appends it to the list of sections
associated with descriptor
-.Ar elf .
+.Fa elf .
The library will automatically increment the
.Va e_shnum
field of the ELF header associated with descriptor
-.Ar elf ,
+.Fa elf ,
and will set the
.Dv ELF_F_DIRTY
flag on the returned section descriptor.
@@ -85,7 +85,7 @@ on the first call to
Function
.Fn elf_nextscn
takes a section descriptor
-.Ar scn
+.Fa scn
and returns a pointer to the section descriptor at the next higher
index.
As a consequence,
@@ -93,7 +93,7 @@ As a consequence,
will never return a pointer to the empty section at index zero
.Dv ( SHN_UNDEF ) .
Argument
-.Ar scn
+.Fa scn
is allowed to be
.Dv NULL ,
in which case this function will return a pointer to the section
@@ -123,31 +123,31 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar elf
+.Fa elf
or
-.Ar scn
+.Fa scn
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar index
+.Fa index
exceeded the current number of sections in the ELF object.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not a descriptor for an ELF file.
.It Bq Er ELF_E_ARGUMENT
Section descriptor
-.Ar scn
+.Fa scn
was not associated with ELF descriptor
-.Ar elf .
+.Fa elf .
.It Bq Er ELF_E_CLASS
Descriptor
-.Ar elf
+.Fa elf
was of an unknown ELF class.
.It Bq Er ELF_E_SECTION
Argument
-.Ar elf
+.Fa elf
specified extended section numbering in the ELF header with the section header at
index
.Dv SHN_UNDEF
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getshdrnum.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getshdrnum.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getshdrnum.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getshdrnum.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getshdrnum.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getshdrnum.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getshdrnum.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getshdrnum.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getshdrnum.3 3956 2022-03-12 12:39:30Z jkoshy
.\"
.Dd August 4, 2009
.Dt ELF_GETSHDRNUM 3
@@ -41,9 +41,9 @@
Function
.Fn elf_getshdrnum
retrieves the number of ELF sections associated with descriptor
-.Ar elf
+.Fa elf
and stores it into the location pointed to by argument
-.Ar shnum .
+.Fa shnum .
.Pp
This routine allows applications to uniformly process both normal ELF
objects, and ELF objects that use extended section numbering.
@@ -60,14 +60,14 @@ can fail with the following errors:
A
.Dv NULL
value was passed in for argument
-.Ar elf .
+.Fa elf .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not for an ELF file.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
lacks an ELF Executable header.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getshdrstrndx.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getshdrstrndx.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getshdrstrndx.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getshdrstrndx.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getshdrstrndx.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getshdrstrndx.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getshdrstrndx.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getshdrstrndx.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getshdrstrndx.3 3956 2022-03-12 12:39:30Z jkoshy
.\"
.Dd August 5, 2009
.Dt ELF_GETSHDRSTRNDX 3
@@ -42,9 +42,9 @@ Function
.Fn elf_getshdrstrndx
retrieves the section index of the string table containing section
names from descriptor
-.Ar elf
+.Fa elf
and stores it into the location pointed to by argument
-.Ar ndxptr .
+.Fa ndxptr .
.Pp
This function allow applications to process both normal ELF
objects and ELF objects that use extended section numbering uniformly.
@@ -57,18 +57,18 @@ These functions can fail with the follow
A
.Dv NULL
value was passed in for argument
-.Ar elf .
+.Fa elf .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not for an ELF file.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
lacks an ELF Executable header.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
contained a value in the reserved range of section indices.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getshnum.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getshnum.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getshnum.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getshnum.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getshnum.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getshnum.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getshnum.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getshnum.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getshnum.3 3956 2022-03-12 12:39:30Z jkoshy
.\"
.Dd August 5, 2009
.Dt ELF_GETSHNUM 3
@@ -46,9 +46,9 @@ instead.
Function
.Fn elf_getshnum
retrieves the number of ELF sections associated with descriptor
-.Ar elf
+.Fa elf
and stores it into the location pointed to by argument
-.Ar shnum .
+.Fa shnum .
.Pp
This routine allows applications to uniformly process both normal ELF
objects, and ELF objects that use extended section numbering.
@@ -66,14 +66,14 @@ can fail with the following errors:
A
.Dv NULL
value was passed in for argument
-.Ar elf .
+.Fa elf .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not for an ELF file.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
lacks an ELF Executable header.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/elf_getshstrndx.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_getshstrndx.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_getshstrndx.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_getshstrndx.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_getshstrndx.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_getshstrndx.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_getshstrndx.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_getshstrndx.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_getshstrndx.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd July 25, 2018
.Dt ELF_GETSHSTRNDX 3
@@ -52,14 +52,14 @@ Function
.Fn elf_getshstrndx
retrieves the section index of the string table containing section
names from descriptor
-.Ar elf
+.Fa elf
and stores it into the location pointed to by argument
-.Ar ndxptr .
+.Fa ndxptr .
.Pp
Function
.Fn elf_setshstrndx
sets the index of the section name string table to argument
-.Ar ndx .
+.Fa ndx .
.Pp
These routines allow applications to process both normal ELF
objects and ELF objects that use extended section numbering uniformly.
@@ -73,18 +73,18 @@ These functions can fail with the follow
A
.Dv NULL
value was passed in for argument
-.Ar elf .
+.Fa elf .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not for an ELF file.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
lacks an ELF Executable header.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
contained a value in the reserved range of section indices.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/elf_hash.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_hash.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_hash.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_hash.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_hash.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_hash.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_hash.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_hash.3 3639 2018-10-14 14:07:02Z jkoshy
+.\" Id: elf_hash.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd August 15, 2006
.Dt ELF_HASH 3
@@ -42,7 +42,7 @@ Function
.Fn elf_hash
computes a portable hash value for the null terminated string
pointed to by argument
-.Ar name .
+.Fa name .
.Pp
The hash value returned is will be identical across
machines of different architectures.
Index: src/external/bsd/elftoolchain/dist/libelf/elf_kind.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_kind.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_kind.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_kind.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_kind.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_kind.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_kind.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_kind.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_kind.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd June 1, 2006
.Dt ELF_KIND 3
@@ -41,9 +41,9 @@
The
.Fn elf_kind
function identifies the kind of file associated with its argument
-.Ar elf .
+.Fa elf .
The argument
-.Ar elf
+.Fa elf
is allowed to be
.Dv NULL .
.Sh RETURN VALUES
@@ -53,20 +53,20 @@ function returns one of the following va
.Bl -tag -width indent
.It Dv ELF_K_AR
The file associated with argument
-.Ar elf
+.Fa elf
is an archive.
.It Dv ELF_K_ELF
The file associated with argument
-.Ar elf
+.Fa elf
is an ELF file.
.It Dv ELF_K_NONE
The argument
-.Ar elf
+.Fa elf
was
.Dv NULL ,
or the ELF library could not determine the type of the file
associated with argument
-.Ar elf ,
+.Fa elf ,
or an error occurred when processing.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/elf_memory.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_memory.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_memory.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_memory.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_memory.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_memory.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_memory.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_memory.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_memory.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd June 28, 2006
.Dt ELF_MEMORY 3
@@ -45,10 +45,10 @@ is used to process an ELF file or
archive whose image is present in memory.
.Pp
Argument
-.Ar image
+.Fa image
points to the start of the memory image of the file or archive.
Argument
-.Ar size
+.Fa size
contains the size in bytes of the memory image.
.Pp
The ELF descriptor is created for reading (i.e., analogous to the
@@ -95,9 +95,9 @@ can fail with the following errors:
A
.Dv NULL
value was used for argument
-.Ar image
+.Fa image
or the value of argument
-.Ar sz
+.Fa sz
was zero.
.It Bq Er ELF_E_HEADER
The header of the ELF object contained an unsupported value in its
@@ -116,7 +116,7 @@ was called before a working version was
.Xr elf_version 3 .
.It Bq Er ELF_E_VERSION
The ELF object referenced by argument
-.Ar image
+.Fa image
was of an unsupported ELF version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/elf_next.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_next.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_next.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_next.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_next.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_next.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_next.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_next.3 3698 2019-02-28 06:34:42Z jkoshy
+.\" Id: elf_next.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd February 27, 2019
.Dt ELF_NEXT 3
@@ -41,7 +41,7 @@
The
.Fn elf_next
function causes the ELF archive descriptor corresponding to argument
-.Ar elf
+.Fa elf
to be adjusted to provide access to the next member in
the archive on a subsequent call to
.Fn elf_begin .
@@ -56,7 +56,7 @@ If successful, function
returns the value
.Dv ELF_C_READ .
Otherwise, if argument
-.Ar elf
+.Fa elf
was not associated with an archive, or if it was
.Dv NULL ,
or if any other error occurred, the value
@@ -86,13 +86,13 @@ may fail with the following error:
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not associated with a containing
.Xr ar 1
archive.
.It Bq Er ELF_E_ARGUMENT
An error was encountered while parsing the archive containing argument
-.Ar elf .
+.Fa elf .
.El
.Sh SEE ALSO
.Xr elf 3 ,
Index: src/external/bsd/elftoolchain/dist/libelf/elf_open.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_open.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_open.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_open.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_open.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_open.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_open.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2012 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_open.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_open.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd June 12, 2019
.Dt ELF_OPEN 3
@@ -58,7 +58,7 @@ returns an Elf descriptor opened with mo
for the ELF object or
.Xr ar 1
archive referenced by the file descriptor in argument
-.Ar fd .
+.Fa fd .
.Pp
The function
.Fn elf_openmemory
@@ -67,9 +67,9 @@ returns an ELF descriptor opened with mo
for the ELF object or
.Xr ar 1
archive contained in the memory area pointed to by the argument
-.Ar image .
+.Fa image .
The argument
-.Ar sz
+.Fa sz
specifies the size of the memory area in bytes.
.Sh RETURN VALUES
The function returns a pointer to a ELF descriptor if successful, or
@@ -94,22 +94,22 @@ These functions can fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
The argument
-.Ar fd
+.Fa fd
was of an unsupported file type.
.It Bq Er ELF_E_ARGUMENT
The argument
-.Ar sz
+.Fa sz
was zero, or the argument
-.Ar image
+.Fa image
was
.Dv NULL .
.It Bq Er ELF_E_IO
The file descriptor in argument
-.Ar fd
+.Fa fd
was invalid.
.It Bq Er ELF_E_IO
The file descriptor in argument
-.Ar fd
+.Fa fd
could not be read.
.It Bq Er ELF_E_RESOURCE
An out of memory condition was encountered.
Index: src/external/bsd/elftoolchain/dist/libelf/elf_rand.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_rand.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_rand.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_rand.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_rand.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_rand.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_rand.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_rand.3 3639 2018-10-14 14:07:02Z jkoshy
+.\" Id: elf_rand.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd June 17, 2006
.Dt ELF_RAND 3
@@ -41,14 +41,14 @@
The
.Fn elf_rand
function causes the ELF descriptor
-.Ar archive
+.Fa archive
to be adjusted so that the next call to
.Xr elf_begin 3
will provide access to the archive member at byte offset
-.Ar offset
+.Fa offset
in the archive.
Argument
-.Ar offset
+.Fa offset
is the byte offset from the start of the archive to the beginning of
the archive header for the desired member.
.Pp
@@ -59,7 +59,7 @@ function.
Function
.Fn elf_rand
returns
-.Ar offset
+.Fa offset
if successful or zero in case of an error.
.Sh EXAMPLES
To process all the members of an archive use:
@@ -97,17 +97,17 @@ may fail with the following errors:
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar archive
+.Fa archive
was null.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar archive
+.Fa archive
was not a descriptor for an
.Xr ar 1
archive.
.It Bq Er ELF_E_ARCHIVE
Argument
-.Ar offset
+.Fa offset
did not correspond to the start of an archive member header.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_rawfile.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_rawfile.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_rawfile.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_rawfile.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_rawfile.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd July 3, 2006
.Dt ELF_RAWFILE 3
@@ -41,10 +41,10 @@
Function
.Fn elf_rawfile
returns the uninterpreted contents of the file referenced by ELF descriptor
-.Ar elf .
+.Fa elf .
.Pp
If argument
-.Ar sz
+.Fa sz
is non-null, the function stores the file's size in bytes
in the location to which it points.
A value of zero is written to this location if an error is
@@ -62,12 +62,12 @@ may fail with the following errors:
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was
.Dv NULL .
.It Bq Er ELF_E_SEQUENCE
Argument
-.Ar elf
+.Fa elf
was opened for writing and function
.Fn elf_rawfile
was invoked before
Index: src/external/bsd/elftoolchain/dist/libelf/elf_strptr.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_strptr.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_strptr.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_strptr.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_strptr.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_strptr.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_strptr.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_strptr.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: elf_strptr.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd December 16, 2006
.Dt ELF_STRPTR 3
@@ -47,13 +47,13 @@ of multiple
descriptors covering the contents of the section.
.Pp
Argument
-.Ar elf
+.Fa elf
is a descriptor for an ELF object.
Argument
-.Ar scndx
+.Fa scndx
is the section index for an ELF string table.
Argument
-.Ar stroffset
+.Fa stroffset
is the index of the desired string in the string
table.
.Sh RETURN VALUES
@@ -66,48 +66,48 @@ in case an error was encountered.
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not a descriptor for an ELF object.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar scndx
+.Fa scndx
was not the section index for a string table.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar stroffset
+.Fa stroffset
exceeded the size of the string table.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar stroffset
+.Fa stroffset
index an unallocated region of the string table.
.It Bq Er ELF_E_DATA
Offset
-.Ar stroffset
+.Fa stroffset
indexed a region that was not covered by any Elf_Data
descriptor.
.It Bq Er ELF_E_DATA
An erroneous
.Vt Elf_Data
descriptor was part of the section specified by argument
-.Ar scndx .
+.Fa scndx .
.It Bq Er ELF_E_HEADER
ELF descriptor
-.Ar elf
+.Fa elf
contained an invalid section header.
.It Bq Er ELF_E_RESOURCE
An out of memory condition was detected.
.It Bq Er ELF_E_SECTION
Section
-.Ar scndx
+.Fa scndx
contained a malformed section header.
.It Bq Er ELF_E_SECTION
The ELF descriptor in argument
-.Ar elf
+.Fa elf
did not adhere to the conventions used for extended numbering.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/elf_update.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_update.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_update.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_update.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_update.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_update.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_update.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006-2011 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_update.3 3734 2019-04-22 14:10:49Z jkoshy
+.\" Id: elf_update.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd April 22, 2019
.Dt ELF_UPDATE 3
@@ -45,11 +45,11 @@ object and optionally write out the imag
to file.
.Pp
Argument
-.Ar elf
+.Fa elf
should reference a valid ELF descriptor.
.Pp
Argument
-.Ar cmd
+.Fa cmd
can be one of the following values:
.Bl -tag -width "Dv ELF_C_WRITE"
.It Dv ELF_C_NULL
@@ -61,7 +61,7 @@ flag, but will not write data to the und
The library will recalculate structural information and will
also write the new image to the underlying file.
The ELF descriptor referenced by argument
-.Ar elf
+.Fa elf
should permit the underlying ELF object to be written or updated
(see
.Xr elf_begin 3 ) .
@@ -72,7 +72,7 @@ All pointers to
and
.Vt Elf_Data
descriptors associated with descriptor
-.Ar elf
+.Fa elf
should be considered invalid after a call to
.Fn elf_update .
.Ss Specifying Object Layout
@@ -253,27 +253,27 @@ This function may fail with the followin
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was null.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar cmd
+.Fa cmd
was not recognized.
.It Bq Er ELF_E_ARGUMENT
The argument
-.Ar elf
+.Fa elf
was not a descriptor for an ELF object.
.It Bq Er ELF_E_CLASS
The
.Va e_ident[EI_CLASS]
field of the executable header of argument
-.Ar elf
+.Fa elf
did not match the class of the file.
.It Bq Er ELF_E_DATA
An
.Vt Elf_Data
descriptor contained in argument
-.Ar elf
+.Fa elf
specified an unsupported type.
.It Bq Er ELF_E_DATA
An
@@ -282,7 +282,7 @@ descriptor specified an alignment that w
two.
.It Bq Er ELF_E_HEADER
The ELF header in argument
-.Ar elf
+.Fa elf
requested a different byte order from the byte order already
associated with the file.
.It Bq Er ELF_E_IO
@@ -291,15 +291,15 @@ An I/O error was encountered.
An
.Vt Elf_Data
descriptor contained in argument
-.Ar elf
+.Fa elf
specified an alignment incompatible with its containing section.
.It Bq Er ELF_E_LAYOUT
Argument
-.Ar elf
+.Fa elf
contained section descriptors that overlapped in extent.
.It Bq Er ELF_E_LAYOUT
Argument
-.Ar elf
+.Fa elf
contained section descriptors that were incorrectly aligned or were
too small for their data.
.It Bq Er ELF_E_LAYOUT
@@ -333,7 +333,7 @@ operation was requested with an ELF desc
writing or updating.
.It Bq Er ELF_E_SECTION
Argument
-.Ar elf
+.Fa elf
contained a section with an unrecognized type.
.It Bq Er ELF_E_SECTION
The section header at index
@@ -345,15 +345,15 @@ An
operation was requested after a prior call to
.Fn elf_cntl elf ELF_C_FDDONE
disassociated the ELF descriptor
-.Ar elf
+.Fa elf
from its underlying file.
.It Bq Er ELF_E_UNIMPL
Argument
-.Ar elf
+.Fa elf
contained a section with an unsupported ELF type.
.It Bq Er ELF_E_VERSION
Argument
-.Ar elf
+.Fa elf
had an unsupported version or contained an
.Vt Elf_Data
descriptor with an unsupported version.
Index: src/external/bsd/elftoolchain/dist/libelf/elf_version.3
diff -u src/external/bsd/elftoolchain/dist/libelf/elf_version.3:1.4 src/external/bsd/elftoolchain/dist/libelf/elf_version.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/elf_version.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/elf_version.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: elf_version.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: elf_version.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: elf_version.3 3639 2018-10-14 14:07:02Z jkoshy
+.\" Id: elf_version.3 3957 2022-03-12 14:11:52Z jkoshy
.\"
.Dd November 9, 2011
.Dt ELF_VERSION 3
@@ -45,7 +45,7 @@ library, and to inform the ELF library a
operating version.
.Pp
If the argument
-.Ar version
+.Fa version
is
.Dv EV_NONE ,
the
@@ -54,18 +54,18 @@ function returns the currently configure
ELF library.
.Pp
If the argument
-.Ar version
+.Fa version
is not
.Dv EV_NONE ,
and if argument
-.Ar version
+.Fa version
is supported by the ELF library, function
.Fn elf_version
sets the library's operating version to
-.Ar version ,
+.Fa version ,
and returns the previous value of the operating version.
If argument
-.Ar version
+.Fa version
cannot be supported, then the
.Fn elf_version
function returns
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_checksum.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_checksum.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_checksum.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_checksum.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_checksum.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd August 29, 2006
.Dt GELF_CHECKSUM 3
@@ -47,7 +47,7 @@
.Sh DESCRIPTION
These functions return a simple checksum of the ELF object described
by their argument
-.Ar elf .
+.Fa elf .
The checksum is computed in way that allows its value to remain
unchanged in presence of modifications to the ELF object by utilities
like
@@ -56,14 +56,14 @@ like
Function
.Fn elf32_checksum
returns a checksum for an ELF descriptor
-.Ar elf
+.Fa elf
of class
.Dv ELFCLASS32 .
.Pp
Function
.Fn elf64_checksum
returns a checksum for an ELF descriptor
-.Ar elf
+.Fa elf
of class
.Dv ELFCLASS64 .
.Pp
@@ -71,7 +71,7 @@ Function
.Fn gelf_checksum
provides a class-independent way retrieving the checksum
for ELF object
-.Ar elf .
+.Fa elf .
.Sh RETURN VALUES
These functions return the checksum of the ELF object, or zero in case
an error was encountered.
@@ -80,16 +80,16 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not a descriptor for an ELF file.
.It Bq Er ELF_E_ARGUMENT
The ELF descriptor
-.Ar elf
+.Fa elf
was not opened for reading or updating.
.It Bq Er ELF_E_CLASS
For functions
@@ -97,17 +97,17 @@ For functions
and
.Fn elf64_checksum ,
ELF descriptor
-.Ar elf
+.Fa elf
did not match the class of the called function.
.It Bq Er ELF_E_HEADER
The ELF object specified by argument
-.Ar elf
+.Fa elf
had a malformed executable header.
.It Bq Er ELF_E_RESOURCE
An out of memory condition was detected during processing.
.It Bq Er ELF_E_SECTION
The ELF object specified by argument
-.Ar elf
+.Fa elf
contained a section with a malformed section header.
.It Bq Er ELF_E_VERSION
The ELF object was of an unsupported version.
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_fsize.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_fsize.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_fsize.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_fsize.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_fsize.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd February 5, 2008
.Dt GELF_FSIZE 3
@@ -46,9 +46,9 @@
.Fn gelf_fsize "Elf *elf" "Elf_Type type" "size_t count" "unsigned int version"
.Sh DESCRIPTION
These functions return the size in bytes of the file representation of
-.Ar count
+.Fa count
numbers of objects of ELF type
-.Ar type .
+.Fa type .
For ELF types that are of variable length, these functions return a
size of one byte.
.Pp
@@ -64,7 +64,7 @@ respectively.
Function
.Fn gelf_fsize
returns the size for the class of ELF descriptor
-.Ar elf .
+.Fa elf .
.Sh RETURN VALUES
These functions return a non-zero value in case of success, or zero in
case of an error.
@@ -73,26 +73,26 @@ These functions may fail with:
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was
.Dv NULL
in a call to
.Fn gelf_fsize .
.It Bq Er ELF_E_ARGUMENT
ELF descriptor
-.Ar elf
+.Fa elf
had an unknown ELF class.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar type
+.Fa type
contained an illegal value.
.It Bq Er ELF_E_UNIMPL
Support for ELF type
-.Ar type
+.Fa type
has not been implemented.
.It Bq Er ELF_E_VERSION
Argument
-.Ar version
+.Fa version
is not a supported version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getcap.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getcap.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getcap.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getcap.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getcap.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getcap.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getcap.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getcap.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getcap.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd April 22, 2019
.Dt GELF_GETCAP 3
@@ -48,13 +48,13 @@ or
information.
.Pp
Argument
-.Ar data
+.Fa data
is an
.Vt Elf_Data
descriptor associated with a section of type
.Dv SHT_SUNW_cap .
Argument
-.Ar ndx
+.Fa ndx
is the index of the entry being retrieved or updated.
The class-independent
.Vt GElf_Cap
@@ -64,22 +64,22 @@ structure is described in
Function
.Fn gelf_getcap
retrieves the class-dependent entry at index
-.Ar ndx
+.Fa ndx
in data buffer
-.Ar data
+.Fa data
and copies it to the destination pointed to by argument
-.Ar cap
+.Fa cap
after translation to class-independent form.
.Pp
Function
.Fn gelf_update_cap
converts the class-independent entry pointed to
by argument
-.Ar cap
+.Fa cap
to class-dependent form, and writes it to the entry at index
-.Ar ndx
+.Fa ndx
in the data buffer described by argument
-.Ar data .
+.Fa data .
Function
.Fn gelf_update_cap
signals an error if any of the values in the class-independent
@@ -89,7 +89,7 @@ type.
Function
.Fn gelf_getcap
returns the value of argument
-.Ar cap
+.Fa cap
if successful, or
.Dv NULL
in case of an error.
@@ -101,19 +101,19 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar data
+.Fa data
or
-.Ar cap
+.Fa cap
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
was less than zero or larger than the number of entries in the data
descriptor.
.It Bq Er ELF_E_ARGUMENT
Data descriptor
-.Ar data
+.Fa data
was not associated with a section of type
.Dv SHT_SUNW_cap .
.It Bq Er ELF_E_RANGE
@@ -122,7 +122,7 @@ A value was not representable in the tar
The
.Vt Elf_Data
descriptor denoted by argument
-.Ar data
+.Fa data
is associated with an ELF object with an unsupported version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getclass.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getclass.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getclass.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getclass.3 3639 2018-10-14 14:07:02Z jkoshy
+.\" Id: gelf_getclass.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd July 3, 2006
.Dt GELF_GETCLASS 3
@@ -41,7 +41,7 @@
Function
.Fn gelf_getclass
returns the ELF class of the descriptor supplied in argument
-.Ar elf .
+.Fa elf .
.Sh RETURN VALUES
Function
.Fn gelf_getclass
@@ -50,12 +50,12 @@ will return one of
or
.Dv ELFCLASS64
if the argument
-.Ar elf
+.Fa elf
is a descriptor for an ELF file.
The value
.Dv ELFCLASSNONE
is returned if argument
-.Ar elf
+.Fa elf
was null, or if it was not a descriptor for an ELF file.
.Sh SEE ALSO
.Xr elf 3 ,
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getdyn.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getdyn.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getdyn.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getdyn.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getdyn.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getdyn.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getdyn.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getdyn.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getdyn.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd April 22, 2019
.Dt GELF_GETDYN 3
@@ -50,13 +50,13 @@ information in the
table of an ELF object.
.Pp
Argument
-.Ar data
+.Fa data
is an
.Vt Elf_Data
descriptor associated with a section of type
.Dv SHT_DYNAMIC .
Argument
-.Ar ndx
+.Fa ndx
is the index of the entry being retrieved or updated.
The class-independent
.Vt GElf_Dyn
@@ -66,22 +66,22 @@ structure is described in
Function
.Fn gelf_getdyn
retrieves the class-dependent entry at index
-.Ar ndx
+.Fa ndx
in data buffer
-.Ar data
+.Fa data
and copies it to the destination pointed to by argument
-.Ar dyn
+.Fa dyn
after translation to class-independent form.
.Pp
Function
.Fn gelf_update_dyn
converts the class-independent entry pointed to
by argument
-.Ar dyn
+.Fa dyn
to class-dependent form, and writes it to the entry at index
-.Ar ndx
+.Fa ndx
in the data buffer described by argument
-.Ar data .
+.Fa data .
Function
.Fn gelf_update_dyn
signals an error if any of the values in the class-independent
@@ -91,7 +91,7 @@ type.
Function
.Fn gelf_getdyn
returns the value of argument
-.Ar dyn
+.Fa dyn
if successful, or
.Dv NULL
in case of an error.
@@ -103,19 +103,19 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar data
+.Fa data
or
-.Ar dyn
+.Fa dyn
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
was less than zero or larger than the number of entries in the data
descriptor.
.It Bq Er ELF_E_ARGUMENT
Data descriptor
-.Ar data
+.Fa data
was not associated with a section of type
.Dv SHT_DYNAMIC .
.It Bq Er ELF_E_RANGE
@@ -124,7 +124,7 @@ A value was not representable in the tar
The
.Vt Elf_Data
descriptor denoted by argument
-.Ar data
+.Fa data
is associated with an ELF object with an unsupported version.
.El
.El
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getehdr.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getehdr.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getehdr.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getehdr.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getehdr.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getehdr.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getehdr.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getehdr.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getehdr.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd December 16, 2006
.Dt GELF_GETEHDR 3
@@ -47,7 +47,7 @@
.Sh DESCRIPTION
These functions retrieve the ELF object file
header from the ELF descriptor
-.Ar elf
+.Fa elf
and return a translated header descriptor to their callers.
.Pp
Functions
@@ -56,20 +56,20 @@ and
.Fn elf64_getehdr
return a pointer to the appropriate class-specific header descriptor
if it exists in the file referenced by descriptor
-.Ar elf .
+.Fa elf .
These functions return
.Dv NULL
if an ELF header was not found in file
-.Ar elf .
+.Fa elf .
.Pp
Function
.Fn gelf_getehdr
stores a translated copy of the header for ELF file
-.Ar elf
+.Fa elf
into the descriptor pointed to by argument
-.Ar dst .
+.Fa dst .
It returns argument
-.Ar dst
+.Fa dst
if successful or
.Dv NULL
in case of failure.
@@ -83,37 +83,37 @@ These functions can fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
The argument
-.Ar elf
+.Fa elf
was null.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not a descriptor for an ELF file.
.It Bq Er ELF_E_ARGUMENT
The elf class of descriptor
-.Ar elf
+.Fa elf
was not recognized.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar dst
+.Fa dst
was null.
.It Bq Er ELF_E_CLASS
The ELF class of descriptor
-.Ar elf
+.Fa elf
did not match that of the API function being called.
.It Bq Er ELF_E_HEADER
ELF descriptor
-.Ar elf
+.Fa elf
does not have an associated header.
.It Bq Er ELF_E_RESOURCE
An out of memory condition was detected during execution.
.It Bq Er ELF_E_SECTION
The ELF descriptor in argument
-.Ar elf
+.Fa elf
did not adhere to the conventions used for extended numbering.
.It Bq Er ELF_E_VERSION
The ELF descriptor
-.Ar elf
+.Fa elf
had an unsupported ELF version number.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getmove.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getmove.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getmove.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getmove.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getmove.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getmove.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getmove.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getmove.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getmove.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd April 22, 2019
.Dt GELF_GETMOVE 3
@@ -48,13 +48,13 @@ and
structures in an ELF object.
.Pp
Argument
-.Ar data
+.Fa data
is an
.Vt Elf_Data
descriptor associated with a section of type
.Dv SHT_SUNW_move .
Argument
-.Ar ndx
+.Fa ndx
is the index of the move record being retrieved or updated.
The class-independent
.Vt GElf_Move
@@ -64,22 +64,22 @@ structure is described in
Function
.Fn gelf_getmove
retrieves class-dependent move record at index
-.Ar ndx
+.Fa ndx
in data buffer
-.Ar data
+.Fa data
and copies it to the destination pointed to by argument
-.Ar move
+.Fa move
after translation to class-independent form.
.Pp
Function
.Fn gelf_update_move
converts the class-independent move information pointed to
by argument
-.Ar move
+.Fa move
to class-dependent form, and writes it to the move record at index
-.Ar ndx
+.Fa ndx
in the data buffer described by argument
-.Ar data .
+.Fa data .
Function
.Fn gelf_update_move
signals an error if any of the values in the class-independent
@@ -89,7 +89,7 @@ type.
Function
.Fn gelf_getmove
returns the value of argument
-.Ar move
+.Fa move
if successful, or
.Dv NULL
in case of an error.
@@ -101,19 +101,19 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar data
+.Fa data
or
-.Ar move
+.Fa move
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
was less than zero or larger than the number of records in the data
descriptor.
.It Bq Er ELF_E_ARGUMENT
Data descriptor
-.Ar data
+.Fa data
was not associated with a section containing move information.
.It Bq Er ELF_E_RANGE
A value was not representable in the target type.
@@ -121,7 +121,7 @@ A value was not representable in the tar
The
.Vt Elf_Data
descriptor denoted by argument
-.Ar data
+.Fa data
is associated with an ELF object with an unsupported version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getphdr.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getphdr.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getphdr.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getphdr.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getphdr.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getphdr.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getphdr.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006-2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getphdr.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getphdr.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd October 21, 2007
.Dt GELF_GETPHDR 3
@@ -66,12 +66,12 @@ function.
Function
.Fn gelf_getphdr
will retrieve the program header table entry at index
-.Ar index
+.Fa index
from ELF descriptor
-.Ar elf .
+.Fa elf .
The translated program header table entry will be written to the
address pointed to be argument
-.Ar dst .
+.Fa dst .
.Pp
Applications may inform the library of modifications to a program header table entry
by using the
@@ -92,43 +92,43 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not a descriptor for an ELF object.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar dst
+.Fa dst
was
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Index
-.Ar index
+.Fa index
was out of range.
.It Bq Er ELF_E_CLASS
The class of ELF descriptor
-.Ar elf
+.Fa elf
did not match the expected class of the function being called.
.It Bq Er ELF_E_HEADER
ELF descriptor
-.Ar elf
+.Fa elf
did not possess an executable header.
.It Bq Er ELF_E_HEADER
ELF descriptor
-.Ar elf
+.Fa elf
had a corrupt executable header.
.It Bq Er ELF_E_RESOURCE
An out of memory condition was detected.
.It Bq Er ELF_E_SECTION
The ELF descriptor in argument
-.Ar elf
+.Fa elf
did not adhere to the conventions used for extended numbering.
.It Bq Er ELF_VERSION
ELF descriptor
-.Ar elf
+.Fa elf
was of an unsupported version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getrel.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getrel.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getrel.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getrel.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getrel.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getrel.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getrel.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getrel.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getrel.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd April 22, 2019
.Dt GELF_GETREL 3
@@ -48,13 +48,13 @@ or
structures in an ELF object.
.Pp
Argument
-.Ar data
+.Fa data
is an
.Vt Elf_Data
descriptor associated with a section of type
.Dv SHT_REL .
Argument
-.Ar ndx
+.Fa ndx
is the index of the entry being retrieved or updated.
The class-independent
.Vt GElf_Rel
@@ -64,22 +64,22 @@ structure is described in
Function
.Fn gelf_getrel
retrieves the class-dependent entry at index
-.Ar ndx
+.Fa ndx
in data buffer
-.Ar data
+.Fa data
and copies it to the destination pointed to by argument
-.Ar rel
+.Fa rel
after translation to class-independent form.
.Pp
Function
.Fn gelf_update_rel
converts the class-independent entry pointed to
by argument
-.Ar rel
+.Fa rel
to class-dependent form, and writes it to the entry at index
-.Ar ndx
+.Fa ndx
in the data buffer described by argument
-.Ar data .
+.Fa data .
Function
.Fn gelf_update_rel
signals an error if any of the values in the class-independent
@@ -89,7 +89,7 @@ type.
Function
.Fn gelf_getrel
returns the value of argument
-.Ar rel
+.Fa rel
if successful, or
.Dv NULL
in case of an error.
@@ -101,19 +101,19 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar data
+.Fa data
or
-.Ar rel
+.Fa rel
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
was less than zero or larger than the number of entries in the data
descriptor.
.It Bq Er ELF_E_ARGUMENT
Data descriptor
-.Ar data
+.Fa data
was not associated with a section of type
.Dv SHT_REL .
.It Bq Er ELF_E_RANGE
@@ -122,7 +122,7 @@ A value was not representable in the tar
The
.Vt Elf_Data
descriptor denoted by argument
-.Ar data
+.Fa data
is associated with an ELF object with an unsupported version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getrela.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getrela.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getrela.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getrela.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getrela.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getrela.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getrela.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getrela.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getrela.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd April 22, 2019
.Dt GELF_GETRELA 3
@@ -48,13 +48,13 @@ or
structures in an ELF object.
.Pp
Argument
-.Ar data
+.Fa data
is an
.Vt Elf_Data
descriptor associated with a section of type
.Dv SHT_RELA .
Argument
-.Ar ndx
+.Fa ndx
is the index of the entry being retrieved or updated.
The class-independent
.Vt GElf_Rela
@@ -64,22 +64,22 @@ structure is described in
Function
.Fn gelf_getrela
retrieves the class-dependent entry at index
-.Ar ndx
+.Fa ndx
in data buffer
-.Ar data
+.Fa data
and copies it to the destination pointed to by argument
-.Ar rela
+.Fa rela
after translation to class-independent form.
.Pp
Function
.Fn gelf_update_rela
converts the class-independent entry pointed to
by argument
-.Ar rela
+.Fa rela
to class-dependent form, and writes it to the entry at index
-.Ar ndx
+.Fa ndx
in the data buffer described by argument
-.Ar data .
+.Fa data .
Function
.Fn gelf_update_rela
signals an error if any of the values in the class-independent
@@ -89,7 +89,7 @@ type.
Function
.Fn gelf_getrela
returns the value of argument
-.Ar rela
+.Fa rela
if successful, or
.Dv NULL
in case of an error.
@@ -101,19 +101,19 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar data
+.Fa data
or
-.Ar rela
+.Fa rela
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
was less than zero or larger than the number of entries in the data
descriptor.
.It Bq Er ELF_E_ARGUMENT
Data descriptor
-.Ar data
+.Fa data
was not associated with a section of type
.Dv SHT_RELA .
.It Bq Er ELF_E_RANGE
@@ -122,7 +122,7 @@ A value was not representable in the tar
The
.Vt Elf_Data
descriptor denoted by argument
-.Ar data
+.Fa data
is associated with an ELF object with an unsupported version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getshdr.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getshdr.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getshdr.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getshdr.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getshdr.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getshdr.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getshdr.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getshdr.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getshdr.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd August 27, 2006
.Dt GELF_GETSHDR 3
@@ -47,7 +47,7 @@
.Sh DESCRIPTION
These functions return a pointer to the ELF Section Header data
structure associated with section descriptor
-.Ar scn .
+.Fa scn .
.Pp
Function
.Fn elf32_getshdr
@@ -55,7 +55,7 @@ retrieves a pointer to an
.Vt Elf32_Shdr
structure.
Section descriptor
-.Ar scn
+.Fa scn
must be associated with an ELF descriptor of class
.Dv ELFCLASS32 .
.Pp
@@ -65,16 +65,16 @@ retrieves a pointer to an
.Vt Elf64_Shdr
structure.
Section descriptor
-.Ar scn
+.Fa scn
must be associated with an ELF descriptor of class
.Dv ELFCLASS64 .
.Pp
Function
.Fn gelf_getshdr
copies the values in the section header associated with argument
-.Ar scn
+.Fa scn
to the structure pointed to be argument
-.Ar dst .
+.Fa dst .
The
.Vt GElf_Shdr
data structure is described in
@@ -92,7 +92,7 @@ if an error was encountered.
Function
.Fn gelf_getshdr
returns argument
-.Ar dst
+.Fa dst
if successful, or
.Dv NULL
if an error was encountered.
@@ -101,18 +101,18 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar scn
+.Fa scn
or
-.Ar shdr
+.Fa shdr
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar scn
+.Fa scn
was not associated a descriptor for an ELF object.
.It Bq Er ELF_E_CLASS
The ELF class associated with the section descriptor
-.Ar scn
+.Fa scn
did not match the class expected by the API.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getsym.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getsym.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getsym.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getsym.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getsym.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getsym.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getsym.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getsym.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getsym.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd April 22, 2019
.Dt GELF_GETSYM 3
@@ -48,7 +48,7 @@ and
structures in an ELF object.
.Pp
Argument
-.Ar data
+.Fa data
is an
.Vt Elf_Data
descriptor associated with a section of type
@@ -57,7 +57,7 @@ descriptor associated with a section of
or
.Dv SHT_GNU_versym .
Argument
-.Ar ndx
+.Fa ndx
is the index of the symbol being retrieved or updated.
The class-independent
.Vt GElf_Sym
@@ -67,22 +67,22 @@ structure is described in
Function
.Fn gelf_getsym
retrieves class-dependent symbol information at index
-.Ar ndx
+.Fa ndx
in data buffer
-.Ar data
+.Fa data
and copies it to the destination pointed to by argument
-.Ar sym
+.Fa sym
after translation to class-independent form.
.Pp
Function
.Fn gelf_update_sym
converts the class-independent symbol information pointed to
by argument
-.Ar sym
+.Fa sym
to class-dependent form, and writes it to the symbol entry at index
-.Ar ndx
+.Fa ndx
in the data buffer described by argument
-.Ar data .
+.Fa data .
Function
.Fn gelf_update_sym
signals an error if any of the values in the class-independent
@@ -92,7 +92,7 @@ type.
Function
.Fn gelf_getsym
returns the value of argument
-.Ar sym
+.Fa sym
if successful, or
.Dv NULL
in case of an error.
@@ -104,19 +104,19 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar data
+.Fa data
or
-.Ar sym
+.Fa sym
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
was less than zero or larger than the number of symbols in the data
descriptor.
.It Bq Er ELF_E_ARGUMENT
Data descriptor
-.Ar data
+.Fa data
was not associated with a section containing symbol information.
.It Bq Er ELF_E_RANGE
A value was not representable in the target type.
@@ -124,7 +124,7 @@ A value was not representable in the tar
The
.Vt Elf_Data
descriptor denoted by argument
-.Ar data
+.Fa data
is associated with an ELF object with an unsupported version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getsyminfo.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getsyminfo.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getsyminfo.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getsyminfo.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getsyminfo.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getsyminfo.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getsyminfo.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getsyminfo.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getsyminfo.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd April 22, 2019
.Dt GELF_GETSYMINFO 3
@@ -48,13 +48,13 @@ and
records in an ELF object.
.Pp
Argument
-.Ar data
+.Fa data
is an
.Vt Elf_Data
descriptor associated with a section of type
.Dv SHT_SUNW_syminfo .
Argument
-.Ar ndx
+.Fa ndx
is the index of the record being retrieved or updated.
The class-independent
.Vt GElf_Syminfo
@@ -64,27 +64,27 @@ structure is described in
Function
.Fn gelf_getsyminfo
retrieves class-dependent record at index
-.Ar ndx
+.Fa ndx
in data buffer
-.Ar data
+.Fa data
and copies it to the destination pointed to by argument
-.Ar syminfo
+.Fa syminfo
after translation to class-independent form.
.Pp
Function
.Fn gelf_update_syminfo
converts the class-independent record pointed to
by argument
-.Ar syminfo
+.Fa syminfo
to class-dependent form, and writes it to the record at index
-.Ar ndx
+.Fa ndx
in the data buffer described by argument
-.Ar data .
+.Fa data .
.Sh RETURN VALUES
Function
.Fn gelf_getsyminfo
returns the value of argument
-.Ar syminfo
+.Fa syminfo
if successful, or
.Dv NULL
in case of an error.
@@ -96,25 +96,25 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar data
+.Fa data
or
-.Ar syminfo
+.Fa syminfo
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
was less than zero or larger than the number of symbols in the data
descriptor.
.It Bq Er ELF_E_ARGUMENT
Data descriptor
-.Ar data
+.Fa data
was not associated with a section containing symbol information.
.It Bq Er ELF_E_VERSION
The
.Vt Elf_Data
descriptor denoted by argument
-.Ar data
+.Fa data
is associated with an ELF object with an unsupported version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_getsymshndx.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_getsymshndx.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_getsymshndx.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_getsymshndx.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_getsymshndx.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_getsymshndx.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_getsymshndx.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008,2020 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_getsymshndx.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_getsymshndx.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd September 26, 2020
.Dt GELF_GETSYMSHNDX 3
@@ -61,22 +61,22 @@ respectively, but are capable of handlin
section numbering.
.Pp
Argument
-.Ar symdata
+.Fa symdata
is an
.Vt Elf_Data
descriptor associated with a section of type
.Dv SHT_SYMTAB .
Argument
-.Ar xndxdata
+.Fa xndxdata
is an
.Vt Elf_Data
descriptor associated with a section of type
.Dv SHT_SYMTAB_SHNDX .
Argument
-.Ar ndx
+.Fa ndx
is the index of the symbol table entry being retrieved or updated.
Argument
-.Ar sym
+.Fa sym
is a pointer to a class-independent
.Vt GElf_Sym
structure.
@@ -87,53 +87,53 @@ structures are described in detail in
Function
.Fn gelf_getsymshndx
retrieves symbol information at index
-.Ar ndx
+.Fa ndx
from the data descriptor specified by argument
-.Ar symdata
+.Fa symdata
and stores it in class-independent form in argument
-.Ar sym .
+.Fa sym .
Additionally:
.Bl -bullet
.It
If the arguments
.Ad xndxdata
and
-.Ar xndxptr
+.Fa xndxptr
are both not
.Dv NULL ,
it retrieves the extended section index for the
symbol from the data buffer pointed to by the
argument
-.Ar xndxdata
+.Fa xndxdata
and stores it into the location pointed to by argument
-.Ar xndxptr .
+.Fa xndxptr .
.It
Otherwise, if the argument
-.Ar xndxptr
+.Fa xndxptr
is not
.Dv NULL ,
a value of zero is stored into the location pointed to by
argument
-.Ar xndxptr .
+.Fa xndxptr .
.El
.Pp
Function
.Fn gelf_update_symshndx
updates the underlying symbol table entry in the data
descriptor
-.Ar symdata
+.Fa symdata
with the information in argument
-.Ar sym .
+.Fa sym .
In addition it sets the extended section index in
data buffer
-.Ar xndxdata
+.Fa xndxdata
to the value of argument
-.Ar xndx .
+.Fa xndx .
.Sh RETURN VALUES
Function
.Fn gelf_getsymshndx
returns the value of argument
-.Ar sym
+.Fa sym
if successful, or
.Dv NULL
in case of an error.
@@ -146,43 +146,43 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar symdata ,
-.Ar xndxdata ,
-.Ar xndxptr
+.Fa symdata ,
+.Fa xndxdata ,
+.Fa xndxptr
or
-.Ar sym
+.Fa sym
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
was less than zero, or too large for either of descriptors
-.Ar symdata
+.Fa symdata
or
-.Ar xndxdata .
+.Fa xndxdata .
.It Bq Er ELF_E_ARGUMENT
Data descriptor
-.Ar symdata
+.Fa symdata
was not associated with a section of type
.Dv SHT_SYMTAB .
.It Bq Er ELF_E_ARGUMENT
Data descriptor
-.Ar xndxdata
+.Fa xndxdata
was not associated with a section of type
.Dv SHT_SYMTAB_SHNDX .
.It Bq Er ELF_E_ARGUMENT
Data descriptor
-.Ar symdata
+.Fa symdata
and
-.Ar xndxdata
+.Fa xndxdata
were associated with different ELF objects.
.It Bq Er ELF_E_VERSION
The
.Vt Elf_Data
descriptors denoted by arguments
-.Ar symdata
+.Fa symdata
and
-.Ar xndxdata
+.Fa xndxdata
are associated with an ELF object with an unsupported version.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_newehdr.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_newehdr.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_newehdr.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_newehdr.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_newehdr.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_newehdr.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_newehdr.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006-2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_newehdr.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_newehdr.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd June 12, 2019
.Dt GELF_NEWEHDR 3
@@ -46,7 +46,7 @@
.Fn gelf_newehdr "Elf *elf" "int elfclass"
.Sh DESCRIPTION
These functions retrieve the ELF header from the ELF descriptor
-.Ar elf ,
+.Fa elf ,
allocating a new header if needed.
File data structures are translated to their in-memory representations
as described in
@@ -64,7 +64,7 @@ returns a pointer to a 64 bit
structure.
.Pp
When argument
-.Ar elfclass
+.Fa elfclass
has value
.Dv ELFCLASS32 ,
function
@@ -72,7 +72,7 @@ function
returns the value returned by
.Fn elf32_newehdr "elf" .
When argument
-.Ar elfclass
+.Fa elfclass
has value
.Dv ELFCLASS64
it returns the value returned by
@@ -94,7 +94,7 @@ The identification byte at offset
.Dv EI_CLASS
is set to the ELF class associated with the function being called
or to argument
-.Ar elfclass
+.Fa elfclass
for function
.Fn gelf_newehdr .
.It Va "e_ident[EI_DATA]"
@@ -126,7 +126,7 @@ as needed before calling
If successful, these three functions set the
.Dv ELF_F_DIRTY
flag on ELF descriptor
-.Ar elf .
+.Fa elf .
.Sh RETURN VALUES
These functions return a pointer to a translated header descriptor
if successful, or
@@ -148,32 +148,32 @@ These functions can fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
The argument
-.Ar elf
+.Fa elf
was null.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not a descriptor for an ELF object.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elfclass
+.Fa elfclass
had an unsupported value.
.It Bq Er ELF_E_ARGUMENT
The class of the ELF descriptor
-.Ar elf
+.Fa elf
did not match that of the requested operation.
.It Bq Er ELF_E_ARGUMENT
For function
.Fn gelf_newehdr ,
the class of argument
-.Ar elf
+.Fa elf
was not
.Dv ELFCLASSNONE
and did not match the argument
-.Ar elfclass .
+.Fa elfclass .
.It Bq Er ELF_E_CLASS
The ELF class of descriptor
-.Ar elf
+.Fa elf
did not match that of the API function being called.
.It Bq Er ELF_E_HEADER
A malformed ELF header was detected.
@@ -181,11 +181,11 @@ A malformed ELF header was detected.
An out of memory condition was detected during execution.
.It Bq Er ELF_E_SECTION
The ELF descriptor in argument
-.Ar elf
+.Fa elf
did not adhere to the conventions used for extended numbering.
.It Bq Er ELF_E_VERSION
The ELF descriptor
-.Ar elf
+.Fa elf
had an unsupported ELF version number.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_newphdr.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_newphdr.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_newphdr.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_newphdr.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_newphdr.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_newphdr.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_newphdr.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006-2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_newphdr.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_newphdr.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd June 12, 2019
.Dt GELF_NEWPHDR 3
@@ -58,16 +58,16 @@ Functions
and
.Fn elf64_newphdr
allocate a table of
-.Ar count
+.Fa count
.Vt Elf32_Phdr
and
.Vt Elf64_Phdr
descriptors respectively,
discarding any existing program header table
already present in the ELF descriptor
-.Ar elf .
+.Fa elf .
A value of zero for argument
-.Ar count
+.Fa count
may be used to delete an existing program header table
from an ELF descriptor.
.Pp
@@ -78,9 +78,9 @@ will return a table of
or
.Vt Elf64_Phdr
with
-.Ar count
+.Fa count
elements depending on the ELF class of ELF descriptor
-.Ar elf .
+.Fa elf .
.Pp
The functions set the
.Dv ELF_F_DIRTY
@@ -94,7 +94,7 @@ by a prior call to
or
.Fn elf64_getphdr
on the same descriptor
-.Ar elf
+.Fa elf
will no longer be valid.
.Sh RETURN VALUES
The functions a valid pointer if successful, or
@@ -116,22 +116,22 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not a descriptor for an ELF object.
.It Bq Er ELF_E_CLASS
ELF descriptor
-.Ar elf
+.Fa elf
was of an unrecognized class.
.It Bq Er ELF_E_RESOURCE
An out of memory condition was detected.
.It Bq Er ELF_E_SEQUENCE
An executable header was not allocated for ELF descriptor
-.Ar elf
+.Fa elf
before using these APIs.
.El
.Sh SEE ALSO
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_update_ehdr.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_update_ehdr.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_update_ehdr.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_update_ehdr.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_update_ehdr.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_update_ehdr.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_update_ehdr.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_update_ehdr.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_update_ehdr.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd August 27, 2006
.Dt GELF_UPDATE_EHDR 3
@@ -60,22 +60,22 @@ Function
.Fn gelf_update_ehdr
updates the ELF Executable Header with the values in the
class-independent executable header
-.Ar ehdr .
+.Fa ehdr .
.Pp
Function
.Fn gelf_update_phdr
updates the ELF Program Header structure at index
-.Ar ndx
+.Fa ndx
with the values in the class-independent program header
-.Ar phdr .
+.Fa phdr .
.Pp
Function
.Fn gelf_update_shdr
updates the ELF Section Header structure associated with section
descriptor
-.Ar scn
+.Fa scn
with the values in argument
-.Ar shdr .
+.Fa shdr .
.Sh RETURN VALUES
These functions return a non-zero integer on success, or zero in case
of an error.
@@ -84,33 +84,33 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar elf ,
-.Ar ehdr ,
-.Ar phdr ,
-.Ar scn ,
+.Fa elf ,
+.Fa ehdr ,
+.Fa phdr ,
+.Fa scn ,
or
-.Ar shdr
+.Fa shdr
were
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
was not a descriptor for an ELF object.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar elf
+.Fa elf
had an unsupported ELF class.
.It Bq Er ELF_E_ARGUMENT
Argument
-.Ar ndx
+.Fa ndx
exceeded the number of entries in the program header table.
.It Bq Er ELF_E_ARGUMENT
Section descriptor
-.Ar scn
+.Fa scn
was not associated with an ELF descriptor.
.It Bq Er ELF_E_MODE
ELF descriptor
-.Ar elf
+.Fa elf
was not opened for writing or updating.
.It Bq Er ELF_E_RESOURCE
An out of memory condition was detected.
Index: src/external/bsd/elftoolchain/dist/libelf/gelf_xlatetof.3
diff -u src/external/bsd/elftoolchain/dist/libelf/gelf_xlatetof.3:1.4 src/external/bsd/elftoolchain/dist/libelf/gelf_xlatetof.3:1.5
--- src/external/bsd/elftoolchain/dist/libelf/gelf_xlatetof.3:1.4 Mon Mar 8 20:55:06 2021
+++ src/external/bsd/elftoolchain/dist/libelf/gelf_xlatetof.3 Sat Mar 12 21:37:55 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: gelf_xlatetof.3,v 1.4 2021/03/08 20:55:06 jkoshy Exp $
+.\" $NetBSD: gelf_xlatetof.3,v 1.5 2022/03/12 21:37:55 jkoshy Exp $
.\"
.\" Copyright (c) 2006,2008,2018 Joseph Koshy. All rights reserved.
.\"
@@ -23,7 +23,7 @@
.\" out of the use of this software, even if advised of the possibility of
.\" such damage.
.\"
-.\" Id: gelf_xlatetof.3 3928 2021-03-07 19:47:55Z jkoshy
+.\" Id: gelf_xlatetof.3 3958 2022-03-12 14:31:32Z jkoshy
.\"
.Dd October 11, 2018
.Dt GELF_XLATETOF 3
@@ -86,7 +86,7 @@ and
translate data from in-memory representations to file representations.
.Pp
Argument
-.Ar src
+.Fa src
denotes an
.Vt Elf_Data
descriptor describing the source to be translated.
@@ -117,7 +117,7 @@ is supported.
.El
.Pp
Argument
-.Ar dst
+.Fa dst
describes the destination buffer.
The following elements of the
.Vt Elf_Data
@@ -146,7 +146,7 @@ are not permitted.
.Pp
On successful completion of the translation request the following
fields of the
-.Ar dst
+.Fa dst
descriptor would be modified:
.Bl -hang -offset indent
.It Va d_size
@@ -158,7 +158,7 @@ value of the source data descriptor.
.El
.Pp
Argument
-.Ar file_encoding
+.Fa file_encoding
specifies the encoding in which the file objects are represented.
It must be one of:
.Bl -hang -offset indent
@@ -176,10 +176,10 @@ and
.Fn gelf_xlatetom
select the appropriate translation scheme based on the properties of
argument
-.Ar elf .
+.Fa elf .
.Sh RETURN VALUES
These functions return argument
-.Ar dst
+.Fa dst
if successful, or
.Dv NULL
in case of an error.
@@ -216,17 +216,17 @@ These functions may fail with the follow
.Bl -tag -width "[ELF_E_RESOURCE]"
.It Bq Er ELF_E_ARGUMENT
One of arguments
-.Ar src ,
-.Ar dst
+.Fa src ,
+.Fa dst
or
-.Ar elf
+.Fa elf
was
.Dv NULL .
.It Bq Er ELF_E_ARGUMENT
Arguments
-.Ar src
+.Fa src
and
-.Ar dst
+.Fa dst
were equal.
.It Bq Er ELF_E_ARGUMENT
The desired encoding parameter was not one of
@@ -236,22 +236,22 @@ or
.Dv ELFDATA2MSB .
.It Bq Er ELF_E_ARGUMENT
The
-.Ar d_type
+.Fa d_type
field of argument
-.Ar src
+.Fa src
specified an unsupported type.
.It Bq Er ELF_E_DATA
The
-.Ar src
+.Fa src
argument specified a buffer size that was not an integral multiple of
its underlying type.
.It Bq Er ELF_E_DATA
The
-.Ar dst
+.Fa dst
argument specified a buffer size that was too small.
.It Bq Er ELF_E_DATA
Argument
-.Ar dst
+.Fa dst
specified a destination buffer that overlaps with the source
buffer.
.It Bq Er ELF_E_DATA
@@ -262,18 +262,18 @@ The source buffer for a conversion to fi
inappropriate for the underlying ELF type.
.It Bq Er ELF_E_UNIMPL
The version numbers for arguments
-.Ar dst
+.Fa dst
and
-.Ar src
+.Fa src
were not identical.
.It Bq Er ELF_E_UNIMPL
The argument
-.Ar src
+.Fa src
requested conversion for a type which is not currently
supported.
.It Bq Er ELF_E_VERSION
Argument
-.Ar src
+.Fa src
specified an unsupported version number.
.El
.Sh SEE ALSO