1
0
mirror of https://github.com/dynup/kpatch synced 2025-04-11 03:31:20 +00:00
kpatch/kpatch-build
Josh Poimboeuf fffbb85b81 create-diff-object: handle reference to end of section
Deal with a special case where gcc needs a pointer to the address at the end of
a data section.

This is usually used with a compare instruction to determine when to end a
loop.  The code doesn't actually dereference the pointer so this is "normal"
and we just replace the section reference with a reference to the last symbol
in the section.

Note that this only catches the issue when it happens at the end of a section.
It can also happen in the middle of a section.  In that case, the wrong symbol
will be associated with the reference.  But that's ok because:

1) This situation only occurs when gcc is trying to get the address of the
   symbol, not the contents of its data; and

2) Because kpatch doesn't allow data sections to change, &(var1+sizeof(var1))
   will always be the same as &var2.

Fixes: 
2015-11-13 16:42:40 -06:00
..
insn insn: get it to compile in create-diff-object 2014-05-30 15:19:57 -05:00
create-diff-object.c create-diff-object: handle reference to end of section 2015-11-13 16:42:40 -06:00
kpatch-build kpatch-build: s/TMPBUILDROOT/RPMTOPDIR/ 2015-11-04 12:11:26 -06:00
kpatch-gcc kpatch-gcc: add libstub to ignore list 2015-10-28 11:39:55 -05:00
list.h new .fixup group size algorithm 2014-09-15 14:54:57 -05:00
lookup.c kpatch-build: support patching weak function 2015-10-16 13:21:00 +08:00
lookup.h merge add-patches-section functionality into create-obj-diff 2014-05-20 12:44:30 -05:00
Makefile create-diff-object: make all warnings into errors 2015-10-27 11:29:38 -05:00