kpatch-build: add more ancestors for vmlinux

There are a few more valid ancestors for vmlinux other than built-in.o.
This fixes errors similar to the following:

    ERROR: invalid ancestor arch/x86/lib/lib.a for arch/x86/lib/usercopy_64.o
This commit is contained in:
Josh Poimboeuf 2014-09-14 23:06:43 -05:00
parent 5cce81f49b
commit a851517165

View File

@ -156,8 +156,15 @@ find_kobj() {
while true; do
find_parent_obj $KOBJFILE
if [[ -z $PARENT ]]; then
[[ $KOBJFILE = *built-in.o ]] && KOBJFILE=vmlinux && return
[[ $KOBJFILE = *.ko ]] && return
case $KOBJFILE in
*/built-in.o|\
arch/x86/lib/lib.a|\
arch/x86/kernel/head*.o|\
lib/lib.a)
KOBJFILE=vmlinux
return
esac
if [[ $DEEP_FIND -eq 0 ]]; then
DEEP_FIND=1
continue;