diff options
| author | Aaron Merey <[email protected]> | 2025-10-28 19:56:29 -0400 |
|---|---|---|
| committer | Aaron Merey <[email protected]> | 2025-10-28 19:56:29 -0400 |
| commit | 71ce9d8dea67b66fc201423aa5f07c2aa50f16f8 (patch) | |
| tree | 586a9e2c8a3aca23414c57af263b4e5cb74fcbe5 | |
| parent | 5fd035777d4abfe99ccc800b4a406f2c57f253f8 (diff) | |
doc: Add gelf_update_shdr.3
Signed-off-by: Aaron Merey <[email protected]>
| -rw-r--r-- | doc/Makefile.am | 1 | ||||
| -rw-r--r-- | doc/gelf_update_shdr.3 | 75 |
2 files changed, 76 insertions, 0 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index f8978d50..af7f4097 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -98,6 +98,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \ gelf_getshdr.3 \ gelf_newphdr.3 \ gelf_offscn.3 \ + gelf_update_shdr.3 \ libelf.3 # libdebuginfod man pages (also notrans) diff --git a/doc/gelf_update_shdr.3 b/doc/gelf_update_shdr.3 new file mode 100644 index 00000000..8de998b4 --- /dev/null +++ b/doc/gelf_update_shdr.3 @@ -0,0 +1,75 @@ +.TH GELF_UPDATE_SHDR 3 2025-09-23 "Libelf" "Libelf Programmer's Manual" + +.SH NAME +gelf_update_shdr \- copy a class\-independent section header into a section descriptor + +.SH SYNOPSIS +.nf +.B #include <gelf.h> + +.BI "int gelf_update_shdr(Elf_Scn *" scn ", GElf_Shdr *" src ");" +.fi + +.SH DESCRIPTION +.BR gelf_update_shdr () +copies the class\-independent section header referenced by +.I src +into the section descriptor +.IR scn . +The section header is translated as necessary to match the class ( +.B ELFCLASS32 +or +.BR ELFCLASS64 ) +of the underlying ELF object. If the underlying ELF object has class +.B ELFCLASS32 +then the struct members of +.I src +must fit into 32-bit field values. + +.SH PARAMETERS +.TP +.I scn +Pointer to a section descriptor of type +.BR Elf_Scn . + +.TP +.I src +Pointer to a +.B GElf_Shdr +structure containing the caller’s desired section header contents. + +.SH RETURN VALUE +On success, +.BR gelf_update_shdr () +returns a non-zero value and marks +.I scn +with the +.B ELF_F_DIRTY +flag. On failure, this function returns 0 and elf_errno is set. If +.I scn +or +.I src +are NULL, then 0 is returned without setting elf_errno. + +.SH SEE ALSO +.BR gelf_getshdr (3), +.BR elf_getscn (3), +.BR elf_nextscn (3), +.BR libelf (3), +.BR elf (5) + +.SH ATTRIBUTES +.TS +allbox; +lbx lb lb +l l l. +Interface Attribute Value +T{ +.na +.nh +.BR gelf_update_shdr () +T} Thread safety MT-Safe +.TE + +.SH REPORTING BUGS +Report bugs to <[email protected]> or https://sourceware.org/bugzilla/. |
