2014-05-14 20:43:58 +00:00
|
|
|
#ifndef _LOOKUP_H_
|
|
|
|
#define _LOOKUP_H_
|
|
|
|
|
2019-11-01 19:59:05 +00:00
|
|
|
#include <stdbool.h>
|
2021-08-02 09:22:32 +00:00
|
|
|
#include "kpatch-elf.h"
|
2019-11-01 19:59:05 +00:00
|
|
|
|
2014-05-14 20:43:58 +00:00
|
|
|
struct lookup_table;
|
|
|
|
|
|
|
|
struct lookup_result {
|
2019-11-01 20:03:14 +00:00
|
|
|
char *objname;
|
2018-04-18 18:39:56 +00:00
|
|
|
unsigned long addr;
|
2014-05-14 20:43:58 +00:00
|
|
|
unsigned long size;
|
2018-04-18 18:41:24 +00:00
|
|
|
unsigned long sympos;
|
2018-03-22 20:22:10 +00:00
|
|
|
bool global, exported;
|
2014-05-14 20:43:58 +00:00
|
|
|
};
|
|
|
|
|
2019-11-01 20:03:14 +00:00
|
|
|
struct lookup_table *lookup_open(char *symtab_path, char *objname,
|
2021-08-02 09:32:23 +00:00
|
|
|
char *symvers_path, struct kpatch_elf *kelf);
|
2014-05-14 20:43:58 +00:00
|
|
|
void lookup_close(struct lookup_table *table);
|
2021-08-02 09:22:32 +00:00
|
|
|
bool lookup_symbol(struct lookup_table *table, struct symbol *sym,
|
2018-03-22 20:22:10 +00:00
|
|
|
struct lookup_result *result);
|
2014-05-14 20:43:58 +00:00
|
|
|
|
|
|
|
#endif /* _LOOKUP_H_ */
|