2021年3月6日星期六

compile risc-v toolchain

git clone https://github.com/riscv/riscv-gnu-toolchain

create folder /home/uty/riscv32i

 [uty@u riscv-gnu-toolchain]$ ./configure --prefix=/home/uty/riscv32i --with-arch=rv32ia --with-abi=ilp32

[uty@u riscv-gnu-toolchain]$ make linux


I only need riscv32i, but, to successfully compile the toolchain, the minimal instruction set must be rv32ia

1 条评论:

  1. To disassemble the parts containing code, use objdump -dj .text .
    To examine hard-coded string data, use readelf -x .rodata

    回复删除