Skip to content
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

elf2flt: add riscv 64-bits support v3 #29

Merged

Commits on Aug 27, 2023

  1. elf2flt: add riscv 64-bits support

    Add support for riscv 64bits ISA by defining the relocation types
    R_RISCV_32_PCREL, R_RISCV_ADD32, R_RISCV_SUB32, R_RISCV_32 and
    R_RISCV_64. riscv64 support also needs the __global_pointer$ symbol to
    be defined right after the relocation tables in the data section. To
    define this symbol, the "RISCV_GP" line prefix is added. The "RISCV_GP"
    string is removed if the target CPU type is riscv64 and the definition
    line is dropped for other CPU types.
    
    With these changes, buildroot and busybox build and run on riscv NOMMU
    systems with Linux kernel including patch 6045ab5fea4c
    ("binfmt_flat: do not stop relocating GOT entries prematurely on riscv")
    fixing the binfmt_flat loader. Tested on QEMU and Canaan Kendryte K210
    boards.
    
    This patch is based on earlier work by Christoph Hellwig <[email protected]>.
    
    Signed-off-by: Damien Le Moal <[email protected]>
    damien-lemoal authored and Greg Ungerer committed Aug 27, 2023
    Configuration menu
    Copy the full SHA
    ef8fe04 View commit details
    Browse the repository at this point in the history