kernel: fix build errors for clang
This PR fixes some compile error for clang when I was trying to cross compile kpimg.
KernelPatch/kernel/include/cache.h:48:45: error: value size does not match register size specified by the constraint and modifier
asm volatile("mrs %0, CurrentEL" : "=r"(el));
^
KernelPatch/kernel/patch/module/module.c:13:10: note: in file included from KernelPatch/kernel/patch/module/module.c:13:
#include <cache.h>
^
KernelPatch/kernel/include/cache.h:48:23: note: use constraint modifier "w"
asm volatile("mrs %0, CurrentEL" : "=r"(el));
^~~
KernelPatch/kernel/linux/include/linux/rcupdate.h:81:1: error: non-void function does not return a value in all control paths
}
^
KernelPatch/kernel/patch/module/module.c:23:10: note: in file included from KernelPatch/kernel/patch/module/module.c:23:
#include <linux/rcupdate.h>
^
KernelPatch/kernel/linux/include/linux/rcupdate.h:139:1: error: non-void function does not return a value in all control paths
}
^
KernelPatch/kernel/patch/module/module.c:23:10: note: in file included from KernelPatch/kernel/patch/module/module.c:23:
#include <linux/rcupdate.h>
^
KernelPatch/kernel/linux/include/linux/rcupdate.h:143:1: error: non-void function does not return a value in all control paths
}
^
KernelPatch/kernel/patch/module/module.c:23:10: note: in file included from KernelPatch/kernel/patch/module/module.c:23:
#include <linux/rcupdate.h>
^
KernelPatch/kernel/linux/include/linux/rcupdate.h:147:1: error: non-void function does not return a value in all control paths
}
^
KernelPatch/kernel/patch/module/module.c:23:10: note: in file included from KernelPatch/kernel/patch/module/module.c:23:
#include <linux/rcupdate.h>
^
KernelPatch/kernel/linux/include/linux/rcupdate.h:151:1: error: non-void function does not return a value in all control paths
}
^
KernelPatch/kernel/patch/module/module.c:23:10: note: in file included from KernelPatch/kernel/patch/module/module.c:23:
#include <linux/rcupdate.h>
^
KernelPatch/kernel/linux/include/linux/rcupdate.h:160:1: error: non-void function does not return a value in all control paths
}
^
KernelPatch/kernel/patch/module/module.c:23:10: note: in file included from KernelPatch/kernel/patch/module/module.c:23:
#include <linux/rcupdate.h>
^
KernelPatch/kernel/linux/include/linux/rcupdate.h:164:1: error: non-void function does not return a value in all control paths
}
^
KernelPatch/kernel/patch/module/module.c:23:10: note: in file included from KernelPatch/kernel/patch/module/module.c:23:
#include <linux/rcupdate.h>
^
KernelPatch/kernel/patch/module/module.c:189:13: error: expected expression
unsigned long addr = symbol_lookup_name(name);
^
KernelPatch/kernel/patch/module/module.c:192:18: error: use of undeclared identifier 'addr'
if (!addr) {
^
KernelPatch/kernel/patch/module/module.c:197:31: error: use of undeclared identifier 'addr'
sym[i].st_value = addr;
^
have you tested the kpimg
have you tested the kpimg
patch was successful, os is enable to boot, but the latest apatch version is too old maybe, it doesn't detect kpimg with superkey inputed.
have you tested the kpimg
hi, just installed the latest apk from apatch github workflow, the kpimg works
good, but your modification is no longer applicable to gcc
Can kpm be successfully loaded after using clang to compile kpimg? I used clang and found that module loading failed.