Wentao Guan a12fcf90ed loongarch: Add support for ELF psABI v1.00 relocations
This patch adds support of the stack-based LoongArch relocations
throughout GRUB, including tools, dynamic linkage, and support for
conversion of ELF relocations into PE ones. A stack machine is required
to handle these per the spec [1] (see the R_LARCH_SOP types), of which
a simple implementation is included.

These relocations are produced by binutils 2.38 and 2.39, while the newer
v2.00 relocs require more recent toolchain (binutils 2.40+ & gcc 13+, or
LLVM 16+). GCC 13 has not been officially released as of early 2023, so
support for v1.00 relocs are expected to stay relevant for a while.

[1] https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_relocations

Signed-off-by: Zhou Yang <zhouyang@loongson.cn>
Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
2024-08-26 11:25:29 +08:00
..
2024-08-26 11:25:29 +08:00
2020-08-07 22:25:16 +08:00
2024-08-26 11:25:29 +08:00
2022-02-14 23:31:54 +08:00
2022-02-13 17:00:39 +08:00
2020-08-07 22:25:16 +08:00
2020-08-07 22:25:16 +08:00
2020-08-07 22:25:16 +08:00
2022-04-08 17:21:36 +08:00
2021-01-07 20:32:38 +08:00