Lines Matching refs:rela

97 struct rela *find_rela_by_dest_range(struct section *sec, unsigned long offset,  in find_rela_by_dest_range()
100 struct rela *rela; in find_rela_by_dest_range() local
103 if (!sec->rela) in find_rela_by_dest_range()
107 hash_for_each_possible(sec->rela->rela_hash, rela, hash, o) in find_rela_by_dest_range()
108 if (rela->offset == o) in find_rela_by_dest_range()
109 return rela; in find_rela_by_dest_range()
114 struct rela *find_rela_by_dest(struct section *sec, unsigned long offset) in find_rela_by_dest()
353 struct rela *rela; in read_relas() local
368 sec->base->rela = sec; in read_relas()
371 rela = malloc(sizeof(*rela)); in read_relas()
372 if (!rela) { in read_relas()
376 memset(rela, 0, sizeof(*rela)); in read_relas()
378 if (!gelf_getrela(sec->data, i, &rela->rela)) { in read_relas()
383 rela->type = GELF_R_TYPE(rela->rela.r_info); in read_relas()
384 rela->addend = rela->rela.r_addend; in read_relas()
385 rela->offset = rela->rela.r_offset; in read_relas()
386 symndx = GELF_R_SYM(rela->rela.r_info); in read_relas()
387 rela->sym = find_symbol_by_index(elf, symndx); in read_relas()
388 rela->sec = sec; in read_relas()
389 if (!rela->sym) { in read_relas()
395 list_add_tail(&rela->list, &sec->rela_list); in read_relas()
396 hash_add(sec->rela_hash, &rela->hash, rela->offset); in read_relas()
580 base->rela = sec; in elf_create_rela_section()
594 struct rela *rela; in elf_rebuild_rela_section() local
599 list_for_each_entry(rela, &sec->rela_list, list) in elf_rebuild_rela_section()
615 list_for_each_entry(rela, &sec->rela_list, list) { in elf_rebuild_rela_section()
616 relas[idx].r_offset = rela->offset; in elf_rebuild_rela_section()
617 relas[idx].r_addend = rela->addend; in elf_rebuild_rela_section()
618 relas[idx].r_info = GELF_R_INFO(rela->sym->idx, rela->type); in elf_rebuild_rela_section()
661 struct rela *rela, *tmprela; in elf_close() local
675 list_for_each_entry_safe(rela, tmprela, &sec->rela_list, list) { in elf_close()
676 list_del(&rela->list); in elf_close()
677 hash_del(&rela->hash); in elf_close()
678 free(rela); in elf_close()