Commit Graph

4 Commits

Author SHA1 Message Date
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
Jessica Yu b0f5ded2b0 kpatch-intermediate.h: fix comments 2017-01-23 22:42:25 -08:00
Jessica Yu 42902d0fcc create-diff-object: create intermediate .kpatch.arch section
In addition to .kpatch.relocations and .kpatch.symbols, have
create-diff-object create an .kpatch.arch section. This section can be used
to create .klp.arch. sections that are required for klp modules built for
versions >= 4.9. Each entry in the .kpatch.arch section represents an
arch-specific section (.altinstructions or .parainstructions) and contains
a pointer to the arch-specific section itself (see kpatch_arch struct
member 'sec') and a pointer to the objname string (see kpatch_arch struct
member 'objname'). This is enough information to be able to build
.klp.arch. sections in a later phase of kpatch-build.
2017-01-23 12:43:24 -08:00
Jessica Yu 87643703a7 create-diff-object: create .kpatch.relocations and .kpatch.symbols sections
Instead of creating dynrela sections, have create-diff-object create
intermediate sections .kpatch.relocations and .kpatch.symbols which can
then be used to build (depending on kernel version) either dynrela sections
or klp rela/klp arch sections + klp symbols in a later phase of kpatch-build.
2017-01-23 12:43:17 -08:00