MCPcopy Create free account
hub / github.com/cinit/TMoe / elf_sysv_hash

Function elf_sysv_hash

app/src/main/cpp/utils/elfsym/ElfView.cpp:36–45  ·  view source on GitHub ↗

SysV hash

Source from the content-addressed store, hash-verified

34
35// SysV hash
36static inline uint32_t elf_sysv_hash(const char *name) {
37 uint32_t h = 0, g;
38 while (*name) {
39 h = (h << 4) + *name++;
40 g = h & 0xf0000000;
41 h ^= g;
42 h ^= g >> 24;
43 }
44 return h;
45}
46
47// GNU hash
48static inline uint32_t elf_gnu_hash(const char *name) {

Callers 2

findSymByName32Function · 0.85
findSymByName64Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected