2014-06-17 14:51:47 +00:00
|
|
|
/*
|
|
|
|
* kpatch-patch.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2014 Josh Poimboeuf <jpoimboe@redhat.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Contains the structs used for the patch module special sections
|
|
|
|
*/
|
|
|
|
|
2014-06-18 17:23:38 +00:00
|
|
|
#ifndef _KPATCH_PATCH_H_
|
|
|
|
#define _KPATCH_PATCH_H_
|
2014-06-18 14:48:51 +00:00
|
|
|
|
2014-06-17 14:51:47 +00:00
|
|
|
struct kpatch_patch_func {
|
|
|
|
unsigned long new_addr;
|
|
|
|
unsigned long new_size;
|
|
|
|
unsigned long old_offset;
|
|
|
|
unsigned long old_size;
|
|
|
|
char *name;
|
|
|
|
char *objname;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct kpatch_patch_dynrela {
|
|
|
|
unsigned long dest;
|
|
|
|
unsigned long src;
|
|
|
|
unsigned long type;
|
|
|
|
char *name;
|
|
|
|
char *objname;
|
2014-06-18 17:23:38 +00:00
|
|
|
int exported;
|
2014-06-17 14:51:47 +00:00
|
|
|
int addend;
|
|
|
|
};
|
2014-06-18 17:23:38 +00:00
|
|
|
|
2014-06-27 17:01:39 +00:00
|
|
|
struct kpatch_patch_hook {
|
2014-07-01 17:22:16 +00:00
|
|
|
void (*hook)(void);
|
2014-06-27 17:01:39 +00:00
|
|
|
char *objname;
|
|
|
|
};
|
|
|
|
|
2014-06-18 17:23:38 +00:00
|
|
|
#endif /* _KPATCH_PATCH_H_ */
|