diff options
Diffstat (limited to 'util/riscvtools/make-spike-elf.sh')
-rwxr-xr-x | util/riscvtools/make-spike-elf.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/riscvtools/make-spike-elf.sh b/util/riscvtools/make-spike-elf.sh index 4241c5418a..20ae23c5a3 100755 --- a/util/riscvtools/make-spike-elf.sh +++ b/util/riscvtools/make-spike-elf.sh @@ -22,6 +22,8 @@ OBJECT_FILE=$(mktemp /tmp/coreboot-spike.XXXXXX.o) ELF_FILE="$2" TOOL_PATH="$(dirname "$0")" -objcopy -I binary -O elf32-i386 --binary-architecture i386 "$FLAT_FILE" "$OBJECT_FILE" -ld -m elf_i386 "$OBJECT_FILE" -T "$TOOL_PATH/spike-elf.ld" -o "$ELF_FILE" +riscv64-unknown-linux-gnu-objcopy -I binary -O elf64-littleriscv \ + -B riscv "$FLAT_FILE" "$OBJECT_FILE" +riscv64-unknown-linux-gnu-ld "$OBJECT_FILE" -T "$TOOL_PATH/spike-elf.ld" \ + -o "$ELF_FILE" rm "$OBJECT_FILE" |