SysV hash
| 34 | |
| 35 | // SysV hash |
| 36 | static 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 |
| 48 | static inline uint32_t elf_gnu_hash(const char *name) { |
no outgoing calls
no test coverage detected