mirror of
https://github.com/dynup/kpatch
synced 2024-12-21 12:50:01 +00:00
720768767d
So far create-diff-object worked only with objectfiles built from a single source file. To support object-files built from multiple sources such as linked vmlinux.o, we call locals_match() for each of STT_FILE symbols and store the pointer to the beginning of appropriate symbol block in lookup table in each symbol. Signed-off-by: Artem Savkov <asavkov@redhat.com>
24 lines
532 B
C
24 lines
532 B
C
#ifndef _LOOKUP_H_
|
|
#define _LOOKUP_H_
|
|
|
|
#include <stdbool.h>
|
|
#include "kpatch-elf.h"
|
|
|
|
struct lookup_table;
|
|
|
|
struct lookup_result {
|
|
char *objname;
|
|
unsigned long addr;
|
|
unsigned long size;
|
|
unsigned long sympos;
|
|
bool global, exported;
|
|
};
|
|
|
|
struct lookup_table *lookup_open(char *symtab_path, char *objname,
|
|
char *symvers_path, struct kpatch_elf *kelf);
|
|
void lookup_close(struct lookup_table *table);
|
|
bool lookup_symbol(struct lookup_table *table, struct symbol *sym,
|
|
struct lookup_result *result);
|
|
|
|
#endif /* _LOOKUP_H_ */
|