mirror of
https://github.com/dynup/kpatch
synced 2024-12-24 22:22:03 +00:00
935f199875
The RHEL powerpc kernel is compiled with -O3, which triggers some "interesting" new optimizations. One of them, which seems to be relatively common, is the replacing of a function with two separate "constprop" functions. Previously we only ever saw a single constprop clone, so we just renamed the patched version of the function to match the original version. Now that we can have two such clones, that no longer makes sense. Instead of renaming functions, just improve the correlation logic such that they can be correlated despite having slightly different symbol names. The first clone in the original object is correlated with the first clone in the patched object; the second clone is correlated with the second clone; and so on. This assumes that the order of the symbols and sections doesn't change, which seems to be a reasonable assumption based on past experience with the compiler. Otherwise it will just unnecessarily mark the cloned constprop functions as changed, which is annoying but harmless, and noticeable by a human anyway. Fixes #935. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> |
||
---|---|---|
.. | ||
objs@a5fd47f575 | ||
Makefile | ||
Makefile.include |