MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / xh_elf_hash

Function xh_elf_hash

Bcore/src/main/cpp/xhook/xh_elf.c:302–314  ·  view source on GitHub ↗

ELF hash func

Source from the content-addressed store, hash-verified

300
301//ELF hash func
302static uint32_t xh_elf_hash(const uint8_t *name)
303{
304 uint32_t h = 0, g;
305
306 while (*name) {
307 h = (h << 4) + *name++;
308 g = h & 0xf0000000;
309 h ^= g;
310 h ^= g >> 24;
311 }
312
313 return h;
314}
315
316//GNU hash func
317static uint32_t xh_elf_gnu_hash(const uint8_t *name)

Callers 1

xh_elf_hash_lookupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected