mirror of
https://github.com/dynup/kpatch
synced 2024-12-11 16:04:40 +00:00
38b7ac74ad
In preparation for dynamic symbol linking, the symbol lookup logic is going to move into create-diff-obj anyway. We might as well minimize the code duplication and pull this into create-diff-obj. This avoids having to re-parse the ELF file modify it in-place. Signed-off-by: Seth Jennings <sjenning@redhat.com>
20 lines
572 B
C
20 lines
572 B
C
#ifndef _LOOKUP_H_
|
|
#define _LOOKUP_H_
|
|
|
|
struct lookup_table;
|
|
|
|
struct lookup_result {
|
|
unsigned long value;
|
|
unsigned long size;
|
|
};
|
|
|
|
struct lookup_table *lookup_open(char *path);
|
|
void lookup_close(struct lookup_table *table);
|
|
int lookup_local_symbol(struct lookup_table *table, char *name, char *hint,
|
|
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);
|
|
|
|
#endif /* _LOOKUP_H_ */
|