riscv-software-src / riscv-pk

RISC-V Proxy Kernel
Other
570 stars 304 forks source link

how to suppres "bbl loader" output by spike pk? #312

Closed ericwu17 closed 6 months ago

ericwu17 commented 6 months ago

I am assembling and linking a simple hello world program on a M1 Macbook. I am using the commands:

riscv64-unknown-elf-as test.s -o test.o

riscv64-unknown-elf-ld test.o -o a.out

spike pk ./a.out 

which produces the output

bbl loader
Hello World

I was wondering where the line bbl loader is coming from, and how I can prevent that from being printed to output? I want to be able to assemble and link RISC-V user-mode programs, and run them directly using the spike proxy kernel, without seeing the output bbl loader.

By the way, here's my hello world program in the file test.s:

.global _start
helloworld:
    .ascii "Hello World\n"

_start:
    addi a7, zero, 64
    addi a0, zero, 1
    la a1, helloworld
    addi a2, zero, 12
    ecall

    addi a7, zero, 93
    addi a0, zero, 44
    ecall
aswaterman commented 6 months ago

That's something that should've been deleted a long time ago. I'll make a PR to remove it unconditionally.