mirror of
https://github.com/dynup/kpatch
synced 2024-12-22 13:12:06 +00:00
aa2907df29
We use kelf_base->symbols to find a unique matching FILE+locals combination when we call lookup_open(). If we can't find one matching or we find more than one matching, we error out. If we find a unique one, we setup table->local_syms in lookup_open(), so later lookup_local_symbol() could do its lookup based on table->local_syms. Fixes #604. Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Zhou Chengming <zhouchengming1@huawei.com>
28 lines
786 B
C
28 lines
786 B
C
#ifndef _LOOKUP_H_
|
|
#define _LOOKUP_H_
|
|
|
|
struct lookup_table;
|
|
|
|
struct lookup_result {
|
|
unsigned long value;
|
|
unsigned long size;
|
|
unsigned long pos;
|
|
};
|
|
|
|
struct sym_compare_type {
|
|
char *name;
|
|
int type;
|
|
};
|
|
|
|
struct lookup_table *lookup_open(char *obj_path, char *symvers_path,
|
|
char *hint, struct sym_compare_type *locals);
|
|
void lookup_close(struct lookup_table *table);
|
|
int lookup_local_symbol(struct lookup_table *table, char *name,
|
|
struct lookup_result *result);
|
|
int lookup_global_symbol(struct lookup_table *table, char *name,
|
|
struct lookup_result *result);
|
|
int lookup_is_exported_symbol(struct lookup_table *table, char *name);
|
|
char *lookup_exported_symbol_objname(struct lookup_table *table, char *name);
|
|
|
|
#endif /* _LOOKUP_H_ */
|