summaryrefslogtreecommitdiffstats
path: root/tools/objtool/elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/objtool/elf.c')
-rw-r--r--tools/objtool/elf.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index d547e3f6e0ee..7de243f0a7be 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -59,7 +59,7 @@ static struct symbol *find_symbol_by_index(struct elf *elf, unsigned int idx)
struct symbol *sym;
list_for_each_entry(sec, &elf->sections, list)
- list_for_each_entry(sym, &sec->symbols, list)
+ list_for_each_entry(sym, &sec->symbol_list, list)
if (sym->idx == idx)
return sym;
@@ -70,7 +70,7 @@ struct symbol *find_symbol_by_offset(struct section *sec, unsigned long offset)
{
struct symbol *sym;
- list_for_each_entry(sym, &sec->symbols, list)
+ list_for_each_entry(sym, &sec->symbol_list, list)
if (sym->type != STT_SECTION &&
sym->offset == offset)
return sym;
@@ -86,7 +86,7 @@ struct rela *find_rela_by_dest_range(struct section *sec, unsigned long offset,
if (!sec->rela)
return NULL;
- list_for_each_entry(rela, &sec->rela->relas, list)
+ list_for_each_entry(rela, &sec->rela->rela_list, list)
if (rela->offset >= offset && rela->offset < offset + len)
return rela;
@@ -102,7 +102,7 @@ struct symbol *find_containing_func(struct section *sec, unsigned long offset)
{
struct symbol *func;
- list_for_each_entry(func, &sec->symbols, list)
+ list_for_each_entry(func, &sec->symbol_list, list)
if (func->type == STT_FUNC && offset >= func->offset &&
offset < func->offset + func->len)
return func;
@@ -135,8 +135,8 @@ static int read_sections(struct elf *elf)
}
memset(sec, 0, sizeof(*sec));
- INIT_LIST_HEAD(&sec->symbols);
- INIT_LIST_HEAD(&sec->relas);
+ INIT_LIST_HEAD(&sec->symbol_list);
+ INIT_LIST_HEAD(&sec->rela_list);
list_add_tail(&sec->list, &elf->sections);
@@ -244,8 +244,8 @@ static int read_symbols(struct elf *elf)
sym->len = sym->sym.st_size;
/* sorted insert into a per-section list */
- entry = &sym->sec->symbols;
- list_for_each_prev(tmp, &sym->sec->symbols) {
+ entry = &sym->sec->symbol_list;
+ list_for_each_prev(tmp, &sym->sec->symbol_list) {
struct symbol *s;
s = list_entry(tmp, struct symbol, list);
@@ -298,7 +298,7 @@ static int read_relas(struct elf *elf)
}
memset(rela, 0, sizeof(*rela));
- list_add_tail(&rela->list, &sec->relas);
+ list_add_tail(&rela->list, &sec->rela_list);
if (!gelf_getrela(sec->elf_data, i, &rela->rela)) {
perror("gelf_getrela");
@@ -382,11 +382,11 @@ void elf_close(struct elf *elf)
struct rela *rela, *tmprela;
list_for_each_entry_safe(sec, tmpsec, &elf->sections, list) {
- list_for_each_entry_safe(sym, tmpsym, &sec->symbols, list) {
+ list_for_each_entry_safe(sym, tmpsym, &sec->symbol_list, list) {
list_del(&sym->list);
free(sym);
}
- list_for_each_entry_safe(rela, tmprela, &sec->relas, list) {
+ list_for_each_entry_safe(rela, tmprela, &sec->rela_list, list) {
list_del(&rela->list);
free(rela);
}