Signed-off-by: Aaron Merey <ame...@redhat.com>
---
 doc/elf32_newehdr.3 | 53 +++++++++++++++++++++++++++++++++++++++++++++
 doc/elf64_newehdr.3 | 53 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+)
 create mode 100644 doc/elf32_newehdr.3
 create mode 100644 doc/elf64_newehdr.3

diff --git a/doc/elf32_newehdr.3 b/doc/elf32_newehdr.3
new file mode 100644
index 00000000..95f8f16d
--- /dev/null
+++ b/doc/elf32_newehdr.3
@@ -0,0 +1,53 @@
+.TH ELF32_NEWEHDR 3 2024-08-14 "Libelf" "Libelf Programmer's Manual"
+
+.SH NAME
+elf32_newehdr \- create a new ELF header for an ELF32 object file
+
+.SH SYNOPSIS
+.B #include <libelf.h>
+
+.BI "Elf32_Ehdr *elf32_newehdr(Elf *" elf ");"
+
+.SH DESCRIPTION
+This function initializes a new ELF header
+and associates it with
+.I elf.
+If
+.I elf
+already has an ELF header associated with it, no new header will be created.
+
+.SH PARAMETERS
+.TP
+.I elf
+ELF descriptor for which a new ELF header is to be created.
+
+.SH RETURN VALUE
+On success, return a pointer to the newly created ELF header.  If
+.I elf
+already has an ELF header associated with it, this pre-existing header is
+returned and no new header is created. On failure, return NULL and set a
+libelf error code.
+
+.SH SEE ALSO
+.BR elf_errno (3),
+.BR elf64_newehdr (3),
+.BR libelf (3),
+.BR elf (5)
+
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface      Attribute       Value
+T{
+.na
+.nh
+.BR elf32_newehdr ()
+T}     Thread safety   MT-Safe
+.TE
+
+.SH REPORTING BUGS
+Report bugs to <elfutils-devel@sourceware.org> or 
https://sourceware.org/bugzilla/.
diff --git a/doc/elf64_newehdr.3 b/doc/elf64_newehdr.3
new file mode 100644
index 00000000..5147826b
--- /dev/null
+++ b/doc/elf64_newehdr.3
@@ -0,0 +1,53 @@
+.TH ELF64_NEWEHDR 3 2024-08-14 "Libelf" "Libelf Programmer's Manual"
+
+.SH NAME
+elf64_newehdr \- create a new ELF header for an ELF64 object file
+
+.SH SYNOPSIS
+.B #include <libelf.h>
+
+.BI "Elf64_Ehdr *elf64_newehdr(Elf *" elf ");"
+
+.SH DESCRIPTION
+This function initializes a new ELF header
+and associates it with
+.I elf.
+If
+.I elf
+already has an ELF header associated with it, no new header will be created.
+
+.SH PARAMETERS
+.TP
+.I elf
+ELF descriptor for which a new ELF header is to be created.
+
+.SH RETURN VALUE
+On success, return a pointer to the newly created ELF header.  If
+.I elf
+already has an ELF header associated with it, this pre-existing header is
+returned and no new header is created. On failure, return NULL and set a
+libelf error code.
+
+.SH SEE ALSO
+.BR elf_errno (3),
+.BR elf32_newehdr (3),
+.BR libelf (3),
+.BR elf (5)
+
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface      Attribute       Value
+T{
+.na
+.nh
+.BR elf64_newehdr ()
+T}     Thread safety   MT-Safe
+.TE
+
+.SH REPORTING BUGS
+Report bugs to <elfutils-devel@sourceware.org> or 
https://sourceware.org/bugzilla/.
-- 
2.46.0

Reply via email to