]> git.ipfire.org Git - thirdparty/grub.git/commit
loongarch: Add support for ELF psABI v2.00 relocations
authorXiaotian Wu <wuxiaotian@loongson.cn>
Thu, 27 Apr 2023 07:43:05 +0000 (15:43 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 17 May 2023 11:18:36 +0000 (13:18 +0200)
commit0b4693e32c209596cc72206fb8308d29d0b09ac5
treeeae45247649b802f2af1a528b557971ad4fc017c
parentb264f098be2c55bc5216df545adfadba407d9090
loongarch: Add support for ELF psABI v2.00 relocations

A new set of relocation types was added in the LoongArch ELF psABI v2.00
spec [1], [2] to replace the stack-based scheme in v1.00. Toolchain
support is available from binutils 2.40 and gcc 13 onwards.

This patch adds support for the new relocation types, that are simpler
to handle (in particular, stack operations are gone). Support for the
v1.00 relocs are kept for now, for compatibility with older toolchains.

[1] https://github.com/loongson/LoongArch-Documentation/pull/57
[2] https://loongson.github.io/LoongArch-Documentation/LoongArch-ELF-ABI-EN.html#_appendix_revision_history

Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
configure.ac
grub-core/kern/loongarch64/dl.c
grub-core/kern/loongarch64/dl_helper.c
include/grub/elf.h
include/grub/loongarch64/reloc.h
util/grub-mkimagexx.c
util/grub-module-verifier.c