]> xenbits.xensource.com Git - livepatch-build-tools.git/commit
create-diff-object: ignore .cold.* suffixes in is_bundleable()
authorArtem Savkov <asavkov@redhat.com>
Tue, 29 May 2018 09:51:10 +0000 (11:51 +0200)
committerRoger Pau Monne <roger.pau@citrix.com>
Tue, 21 Jan 2025 13:11:37 +0000 (14:11 +0100)
commit3540f1a391ccdda258786565ddbbac95f645ac6f
treeb6f6ebb4640604a22524fbe6611e79b12bf56ac9
parent950b79a5e9c90747130955b8e32a665c9374f5e5
create-diff-object: ignore .cold.* suffixes in is_bundleable()

While building a gcc-consprop patch from integration tests gcc8 would place a
__timekeeping_inject_sleeptime.constprop.18.cold.27 symbol into
.text.unlikely.__timekeeping_inject_sleeptime.constprop.18 section. Because
section name doesn't have the '.cold.27' suffix this symbol fails
is_bundleable() check while still being bundleable and later exits early in
kpatch_rename_mangled_functions() without renaming the corresponding patched
function. All of this results in a create-diff-object errror:

  ERROR: timekeeping.o: symbol changed sections: __timekeeping_inject_sleeptime.constprop.18.cold.27
  /home/asavkov/dev/kpatch/kpatch-build/create-diff-object: unreconcilable difference

Fix by ignoring .cold.* name suffix in is_bundleable() for.text.unlikely
sections.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
common.c