diff options
| author | WANG Rui <wangrui@loongson.cn> | 2023-12-09 10:49:15 +0300 | 
|---|---|---|
| committer | Huacai Chen <chenhuacai@loongson.cn> | 2023-12-09 10:49:15 +0300 | 
| commit | eea673e9d5ea994c60b550ffb684413d3759b3f4 (patch) | |
| tree | 5357404180f646a323ef55c006b0fc3539aeeae3 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | |
| parent | 33cc938e65a98f1d29d0a18403dbbee050dcad9a (diff) | |
| download | linux-eea673e9d5ea994c60b550ffb684413d3759b3f4.tar.xz | |
LoongArch: Apply dynamic relocations for LLD
For the following assembly code:
     .text
     .global func
 func:
     nop
     .data
 var:
     .dword func
When linked with `-pie`, GNU LD populates the `var` variable with the
pre-relocated value of `func`. However, LLVM LLD does not exhibit the
same behavior. This issue also arises with the `kernel_entry` in arch/
loongarch/kernel/head.S:
 _head:
     .word   MZ_MAGIC                /* "MZ", MS-DOS header */
     .org    0x8
     .dword  kernel_entry            /* Kernel entry point */
The correct kernel entry from the MS-DOS header is crucial for jumping
to vmlinux from zboot. This necessity is why the compressed relocatable
kernel compiled by Clang encounters difficulties in booting.
To address this problem, it is proposed to apply dynamic relocations to
place with `--apply-dynamic-relocs`.
Link: https://github.com/ClangBuiltLinux/linux/issues/1962
Signed-off-by: WANG Rui <wangrui@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py')
0 files changed, 0 insertions, 0 deletions
