Lines Matching refs:ld_map
220 static int read_cache1(const char *ld_map) { in read_cache1() argument
221 struct ld_cache1 *ldcache = (struct ld_cache1 *)ld_map; in read_cache1()
242 static int read_cache2(const char *ld_map) { in read_cache2() argument
243 struct ld_cache2 *ldcache = (struct ld_cache2 *)ld_map; in read_cache2()
246 if (memcmp(ld_map, CACHE2_HEADER, CACHE2_HEADER_LEN)) in read_cache2()
254 const char *key = ld_map + ldcache->entries[i].key; in read_cache2()
255 const char *val = ld_map + ldcache->entries[i].value; in read_cache2()
268 const char *ld_map; in load_ld_cache() local
280 ld_map = (const char *)mmap(NULL, ld_size, PROT_READ, MAP_PRIVATE, fd, 0); in load_ld_cache()
281 if (ld_map == MAP_FAILED) { in load_ld_cache()
286 if (memcmp(ld_map, CACHE1_HEADER, CACHE1_HEADER_LEN) == 0) { in load_ld_cache()
287 const struct ld_cache1 *cache1 = (struct ld_cache1 *)ld_map; in load_ld_cache()
293 ret = read_cache2(ld_map + cache1_len); in load_ld_cache()
295 ret = read_cache1(ld_map); in load_ld_cache()
297 ret = read_cache2(ld_map); in load_ld_cache()
300 munmap((void *)ld_map, ld_size); in load_ld_cache()