mirror of https://github.com/dynup/kpatch
lookup: rename 'pos' to 'sympos'
To more accurately describe its purpose. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
This commit is contained in:
parent
cd121422d9
commit
6cc03f9599
|
@ -2771,7 +2771,7 @@ static void kpatch_create_patches_sections(struct kpatch_elf *kelf,
|
|||
funcs[index].old_addr = result.addr;
|
||||
funcs[index].old_size = result.size;
|
||||
funcs[index].new_size = sym->sym.st_size;
|
||||
funcs[index].sympos = result.pos;
|
||||
funcs[index].sympos = result.sympos;
|
||||
|
||||
/*
|
||||
* Add a relocation that will populate the
|
||||
|
@ -3104,7 +3104,7 @@ static void kpatch_create_intermediate_sections(struct kpatch_elf *kelf,
|
|||
else
|
||||
/* for modules, src is discovered at runtime */
|
||||
ksyms[index].src = 0;
|
||||
ksyms[index].pos = result.pos;
|
||||
ksyms[index].sympos = result.sympos;
|
||||
ksyms[index].type = rela->sym->type;
|
||||
ksyms[index].bind = rela->sym->bind;
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ static struct symbol *find_or_add_ksym_to_symbols(struct kpatch_elf *kelf,
|
|||
|
||||
objname = strings + rela->addend;
|
||||
|
||||
snprintf(pos, 32, "%lu", ksym->pos);
|
||||
snprintf(pos, 32, "%lu", ksym->sympos);
|
||||
/* .klp.sym.objname.name,pos */
|
||||
snprintf(buf, 256, KLP_SYM_PREFIX "%s.%s,%s", objname, name, pos);
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ static void create_dynamic_rela_sections(struct kpatch_elf *kelf, struct section
|
|||
dynrelas[index].addend = krelas[index].addend;
|
||||
dynrelas[index].type = krelas[index].type;
|
||||
dynrelas[index].external = krelas[index].external;
|
||||
dynrelas[index].sympos = ksym->pos;
|
||||
dynrelas[index].sympos = ksym->sympos;
|
||||
|
||||
/* dest */
|
||||
ALLOC_LINK(rela, &dynsec->rela->relas);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
struct kpatch_symbol {
|
||||
unsigned long src;
|
||||
unsigned long pos;
|
||||
unsigned long sympos;
|
||||
unsigned char bind, type;
|
||||
char *name;
|
||||
char *objname; /* object to which this sym belongs */
|
||||
|
|
|
@ -398,7 +398,7 @@ int lookup_local_symbol(struct lookup_table *table, char *name,
|
|||
struct lookup_result *result)
|
||||
{
|
||||
struct object_symbol *sym;
|
||||
unsigned long pos = 0;
|
||||
unsigned long sympos = 0;
|
||||
int i, match = 0, in_file = 0;
|
||||
|
||||
if (!table->local_syms)
|
||||
|
@ -407,7 +407,7 @@ int lookup_local_symbol(struct lookup_table *table, char *name,
|
|||
memset(result, 0, sizeof(*result));
|
||||
for_each_obj_symbol(i, sym, table) {
|
||||
if (sym->bind == STB_LOCAL && !strcmp(sym->name, name))
|
||||
pos++;
|
||||
sympos++;
|
||||
|
||||
if (table->local_syms == sym) {
|
||||
in_file = 1;
|
||||
|
@ -429,7 +429,7 @@ int lookup_local_symbol(struct lookup_table *table, char *name,
|
|||
if (!match)
|
||||
return 1;
|
||||
|
||||
result->pos = pos;
|
||||
result->sympos = sympos;
|
||||
result->addr = sym->addr;
|
||||
result->size = sym->size;
|
||||
return 0;
|
||||
|
@ -447,7 +447,7 @@ int lookup_global_symbol(struct lookup_table *table, char *name,
|
|||
!strcmp(sym->name, name)) {
|
||||
result->addr = sym->addr;
|
||||
result->size = sym->size;
|
||||
result->pos = 0; /* always 0 for global symbols */
|
||||
result->sympos = 0; /* always 0 for global symbols */
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ struct lookup_table;
|
|||
struct lookup_result {
|
||||
unsigned long addr;
|
||||
unsigned long size;
|
||||
unsigned long pos;
|
||||
unsigned long sympos;
|
||||
};
|
||||
|
||||
struct sym_compare_type {
|
||||
|
|
Loading…
Reference in New Issue