-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add LoongArch support for kpatch #1424
base: master
Are you sure you want to change the base?
Commits on Nov 8, 2024
-
kpatch/LoongArch: Add LoongArch specific features
Add section alt_instr check support for LoongArch. Signed-off-by: George Guo <guodongtai@kylinos.cn>
Configuration menu - View commit details
-
Copy full SHA for 6c50586 - Browse repository at this point
Copy the full SHA 6c50586View commit details -
kpatch/LoongArch: Add initial support for kpatch
Add initial support for LoongArch. Signed-off-by: George Guo <guodongtai@kylinos.cn>
Configuration menu - View commit details
-
Copy full SHA for 9a3d0e9 - Browse repository at this point
Copy the full SHA 9a3d0e9View commit details -
kpatch/LoongArch: create and process section __patchable_function_ent…
…ries Generate 2 NOPs right at the beginning of each function with -fpatchable-function-entry=2 in LoongArch. So here create section __patchable_function_entries and check this situation. Co-developed-by: zhanghongchen <zhanghongchen@loongson.cn> Signed-off-by: George Guo <guodongtai@kylinos.cn>
Configuration menu - View commit details
-
Copy full SHA for 411bf6c - Browse repository at this point
Copy the full SHA 411bf6cView commit details -
kpatch/LoongArch: change local labels with sections symbols
Here fix error like: "tcp.o: symbol changed sections: .LBB7266. create-diff-object: unreconcilable difference". Due to LoongArch GCC generating local labels such as .LBB7266, it is difficult to compare the modified sections in the corresponding object files of the two files before and after the patch, so change them with sections symbols in rela section, and delete them in other sections. Co-developed-by: zhanghongchen <zhanghongchen@loongson.cn> Signed-off-by: George Guo <guodongtai@kylinos.cn>
Configuration menu - View commit details
-
Copy full SHA for bd6e184 - Browse repository at this point
Copy the full SHA bd6e184View commit details -
kpatch/LoongArch: fix ld error
Take tcp.o as an example. An ld error occurs as follows: "ld: __patchable_function_entries has both ordered and unordered sections" when linking patch-hook.o and output.o. The link error is triggered by running the command: "ld -r --unique=.parainstructions --unique=.altinstructions -o patch/tmp_output.o output/net/ipv4/tcp.o". With -fpatchable-function-entry, LoongArch GCC sets WAL flags for section __patchable_function_entries in object file (which includes patch-hook.o) by default. Meanwhile, Kpatch sets A flags for output.o in create_section_pair(). To resolve the ld error, we set sh_flags = WAL. Signed-off-by: George Guo <guodongtai@kylinos.cn>
Configuration menu - View commit details
-
Copy full SHA for 4ce2754 - Browse repository at this point
Copy the full SHA 4ce2754View commit details -
kpatch/LoongArch: enable kpatch build
Since kpatch now supports LoongArch basically, enable the build. Signed-off-by: George Guo <guodongtai@kylinos.cn>
Configuration menu - View commit details
-
Copy full SHA for 06f87de - Browse repository at this point
Copy the full SHA 06f87deView commit details -
kpatch/LoongArch: short circuit for patchable sections
Omit patchable sections compare processing, as we will rebuild it. Signed-off-by: George Guo <guodongtai@kylinos.cn>
Configuration menu - View commit details
-
Copy full SHA for 1f52740 - Browse repository at this point
Copy the full SHA 1f52740View commit details -
kpatch/LoongArch: fix build error on non-LoongArch architectures
Added conditional compilation to prevent 'R_LARCH_64' and 'EM_LOONGARCH' from being referenced on x86 and other non-LoongArch architectures. This ensures the code works across different architectures without errors. Signed-off-by: George Guo <guodongtai@kylinos.cn>
Configuration menu - View commit details
-
Copy full SHA for 5826776 - Browse repository at this point
Copy the full SHA 5826776View commit details