kpatch/kpatch-build/kpatch-intermediate.h
Josh Poimboeuf c6c153431f create-klp-module: get rid of redundant kpatch_relocation.offset field
kpatch_relocation's 'dest' addend and 'offset' fields are redundant.  In
fact, the 'offset' field isn't always accurate because it doesn't have a
relocation, so its value doesn't adjust when multiple .o files are
combined.  Just use the 'dest' addend instead.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
2017-11-09 19:16:14 -06:00

49 lines
1.4 KiB
C

/*
* kpatch-intermediate.h
*
* Structures for intermediate .kpatch.* sections
*
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA,
* 02110-1301, USA.
*/
#ifndef _KPATCH_INTERMEDIATE_H_
#define _KPATCH_INTERMEDIATE_H_
/* For .kpatch.{symbols,relocations,arch} sections */
struct kpatch_symbol {
unsigned long src;
unsigned long pos;
unsigned char bind, type;
char *name;
char *objname; /* object to which this sym belongs */
};
struct kpatch_relocation {
unsigned long dest;
unsigned int type;
int addend;
int external;
char *objname; /* object to which this rela applies to */
struct kpatch_symbol *ksym;
};
struct kpatch_arch {
unsigned long sec;
char *objname;
};
#endif /* _KPATCH_INTERMEDIATE_H_ */