struct rb_node *pnode;
struct symbol *iter;
- INIT_LIST_HEAD(&sym->reloc_list);
INIT_LIST_HEAD(&sym->pv_target);
sym->alias = sym;
{
struct reloc *reloc;
- list_for_each_entry(reloc, &sym->reloc_list, sym_reloc_entry) {
+ for (reloc = sym->relocs; reloc; reloc = reloc->sym_next_reloc) {
reloc->rel.r_info = GELF_R_INFO(reloc->sym->idx, reloc_type(reloc));
if (elf_write_reloc(elf, reloc))
return -1;
if (elf_write_reloc(elf, reloc))
return NULL;
- list_add_tail(&reloc->sym_reloc_entry, &sym->reloc_list);
elf_hash_add(reloc, &reloc->hash, reloc_hash(reloc));
+ reloc->sym_next_reloc = sym->relocs;
+ sym->relocs = reloc;
return reloc;
}
return -1;
}
- list_add_tail(&reloc->sym_reloc_entry, &sym->reloc_list);
elf_hash_add(reloc, &reloc->hash, reloc_hash(reloc));
+ reloc->sym_next_reloc = sym->relocs;
+ sym->relocs = reloc;
nr_reloc++;
}
u8 profiling_func : 1;
u8 warned : 1;
struct list_head pv_target;
- struct list_head reloc_list;
+ struct reloc *relocs;
};
struct reloc {
};
struct section *sec;
struct symbol *sym;
- struct list_head sym_reloc_entry;
+ struct reloc *sym_next_reloc;
};
struct elf {