Signed-off-by: Aaron Merey <ame...@redhat.com> --- doc/Makefile.am | 3 ++- doc/elf_hash.3 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 doc/elf_hash.3
diff --git a/doc/Makefile.am b/doc/Makefile.am index 56c56b7b..260a3f09 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -61,7 +61,8 @@ notrans_dist_man3_MANS= elf_update.3 \ libelf.3 \ elf_end \ elf_fill \ - elf_getbase + elf_getbase \ + elf_hash # libdebuginfod man pages (also notrans) # Note we include them even when not building them because we want diff --git a/doc/elf_hash.3 b/doc/elf_hash.3 new file mode 100644 index 00000000..6082c8c8 --- /dev/null +++ b/doc/elf_hash.3 @@ -0,0 +1,49 @@ +.TH ELF_HASH 3 2025-03-31 "Libelf" "Libelf Programmer's Manual" + +.SH NAME +elf_hash \- Compute the standard ELF hash of a string. + +.SH SYNOPSIS +.nf +#include <libelf.h> + +.BI "int elf_hash(const char *" string ");" + +.SH DESCRIPTION +The +.B elf_hash +function computes the standard ELF hash value for a null-terminated +string. The hash values are typically used in ELF object files for +symbol table hashing. The hash function avoids generating +architecture-dependent values and is suitable for use across architectures. + +.SH PARAMETERS +.TP +.I string +NULL-terminated string to be hashed. + +.SH RETURN VALUE +This function returns the standard ELF hash value for +.IR string . + +.SH SEE ALSO +.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 elf_hash () +T} Thread safety MT-Safe +.TE + +.SH REPORTING BUGS +Report bugs to <elfutils-devel@sourceware.org> or https://sourceware.org/bugzilla/. -- 2.49.0