Skip to content

ERROR in find_local_syms, couldn't find matching XXX local symbols in vmlinux symbol table #1360

@ziyangc97

Description

@ziyangc97

hi, I met the following error when making kpatch.

My environment infor

kpatch version: 0.9.7
kernel version: 6.4.0
architecture: x86_64
linux: openEuler
gcc: gcc-12

/root/.kpatch/build.log:

  NM      System.map
  SORTTAB vmlinux
create-diff-object: ERROR: time.o: kpatch_bundle_symbols: 242: symbol __do_sys_adjtimex at offset 16 within section .text.__do_sys_adjtimex, expected 0: Success
ERROR: version-timestamp.o: 1 unsupported section change(s)
create-diff-object: unreconcilable difference: Success

The following is my kernel patch:

--- kernel/time/time.c  2023-09-06 11:19:31.000000000 +0800
+++ kernel/time/time.c.new      2023-09-11 19:06:21.674000162 +0800
@@ -170,6 +170,9 @@ int do_sys_settimeofday64(const struct t
 {
        static int firsttime = 1;
        int error = 0;
+
+       static int testdata=1;
+       printk("Test testdata=%d\n", testdata);

        if (tv && !timespec64_valid_settod(tv))
                return -EINVAL;

Addition info produced by debug_info flag:

+ [[ x86_64 = \p\p\c\6\4\l\e ]]
+ /usr/libexec/kpatch/create-diff-object orig/init/version-timestamp.o patched/init/version-timestamp.o vmlinux /root/.kpatch/tmp/vmlinux.symtab /usr/src/linux-6.4.0-6.0.0.14.oe2309.x86_64/Module.symvers klp_testklp output/init/version-timestamp.o
+ logger 1
+ local to_stdout=1
+ [[ 1 -ge 2 ]]
+ [[ 1 -eq 1 ]]
+ tee -a /root/.kpatch/build.log
ERROR: version-timestamp.o: 1 unsupported section change(s)
create-diff-object: unreconcilable difference: Success
version-timestamp.o: changed section .data not selected for inclusion
+ check_pipe_status create-diff-object
+ rc=2
+ [[ 2 = 139 ]]
+ [[ 2 -eq 0 ]]
+ [[ 2 -eq 3 ]]
+ ERROR=2
+ [[ 2 -eq 0 ]]
+ [[ 2 -ne 0 ]]
+ die '2 error(s) encountered'
+ [[ -z 2 error(s) encountered ]]
+ msg='2 error(s) encountered'
+ [[ -e /root/.kpatch/build.log ]]
+ warn '2 error(s) encountered. Check /root/.kpatch/build.log for more details.'
+ echo 'ERROR: 2 error(s) encountered. Check /root/.kpatch/build.log for more details.'
ERROR: 2 error(s) encountered. Check /root/.kpatch/build.log for more details.
+ exit 1

Thanks in advance for any suggestion or help! Is there any patch that may fix this error already?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions