1 #include "conf.h" 2 #include "crc.h" 3 4 uint32_t ELFCRC(const uint32_t start, const unsigned char *name, const uint32_t n) { 5 uint32_t i,h,g; 6 7 h=start; 8 for (i=0;i<n;i++) { 9 h = (h << 4) + (*name++); 10 if ((g = (h & 0xf0000000))) 11 h ^= (g >> 24); 12 h &= ~g; 13 } 14 15 return(h); 16 } |