mirror of
https://github.com/dynup/kpatch
synced 2024-12-24 06:02:05 +00:00
b64ab2b5e4
Support patching objects that have duplicated function names. This feature was introduced upstream in Linux v4.5. This patch appends the symbol position to the symbol structure when lookup_local_symbol is called. This pos variable is then used when creating the funcs and dynrelas sections. Finally, incorporate sympos into the livepatch patch hook only if the kernel version is greater than v4.5. In other cases the older format is used. Fixes: #493 Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
21 lines
592 B
C
21 lines
592 B
C
#ifndef _LOOKUP_H_
|
|
#define _LOOKUP_H_
|
|
|
|
struct lookup_table;
|
|
|
|
struct lookup_result {
|
|
unsigned long value;
|
|
unsigned long size;
|
|
unsigned long pos;
|
|
};
|
|
|
|
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_ */
|