mirror of
https://github.com/dynup/kpatch
synced 2025-04-11 03:31:20 +00:00
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: #553 |
||
---|---|---|
.. | ||
insn | ||
create-diff-object.c | ||
kpatch-build | ||
kpatch-gcc | ||
list.h | ||
lookup.c | ||
lookup.h | ||
Makefile |