diff options
author | Aaron Merey <[email protected]> | 2025-05-12 20:33:40 -0400 |
---|---|---|
committer | Aaron Merey <[email protected]> | 2025-05-14 14:47:46 -0400 |
commit | 11c54284514498c29147972ddbf35eac4c95039c (patch) | |
tree | 38b2d2b7e2dfbeaf0d438b9a92498b39efa1b73b | |
parent | d6be2a40412ac9daf5d63db2eba4340f162d6045 (diff) |
doc: Add elf_hash.3
Signed-off-by: Aaron Merey <[email protected]>
-rw-r--r-- | doc/Makefile.am | 1 | ||||
-rw-r--r-- | doc/elf_hash.3 | 51 |
2 files changed, 52 insertions, 0 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 00cdc253..343b5460 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -58,6 +58,7 @@ notrans_dist_man3_MANS= elf32_checksum.3 \ elf_getbase.3 \ elf_getdata.3 \ elf_getscn.3 \ + elf_hash.3 \ elf_ndxscn.3 \ elf_update.3 \ elf_version.3 \ diff --git a/doc/elf_hash.3 b/doc/elf_hash.3 new file mode 100644 index 00000000..1e06d888 --- /dev/null +++ b/doc/elf_hash.3 @@ -0,0 +1,51 @@ +.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 "unsigned long 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 is used in SHT_HASH sections as +it 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 . +Only the lower 32 bits of the return value are used. + +.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 <[email protected]> or https://sourceware.org/bugzilla/. |