!2318 objtool: Enable Stack Validation and ORC Generation for ARM64 Kernel Builds
Merge Pull Request from: @popxpo
This pull request introduces objtool support for ARM64 kernel builds, enabling stack validation.
This submission addresses most of the work required to enable objtool on ARM64.
The primary advantage of leveraging objtool is its capability to generate ORC stack metadata during compilation. This metadata facilitates reliable stack unwinding at runtime, as detailed in the [Linux Kernel documentation](https://kernel.org/doc/html/next/x86/orc-unwinder.html).
However, the objtool has revealed compilation issues in certain files that do not adhere to objtool's requirements. To resolve these issues, this submission includes modifications aimed at bringing these files into compliance. For files where annotations offer a solution, annotations have been added. In cases where an immediate solution could not be found, these files are temporarily excluded ([see commit](https://gitee.com/popxpo/kernel/commit/7b938607595fd105066f0c851b8a8c1f37a91a69)).
To utilize objtool's stack validation feature, the STACK_VALIDATION option must be enabled. When enabled, the compiler performs stack validation on the kernel code during compilation and issues warnings for code that does not conform to objtool's rules.
After analyzing the .o target files, objtool determines the stack information for each instruction address in the file. If the file does not conform to objtool's rules, it can issue warnings:
```
./objtool check arch/arm64/kernel/cpu-park.o
arch/arm64/kernel/cpu-park.o: warning: objtool: .text+0x0: unreachable instruction
```
Link:https://gitee.com/openeuler/kernel/pulls/2318
Reviewed-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>