Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Try to fix rv_histogram behaves weird on build/hello.elf #199

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

gagachang
Copy link
Contributor

@gagachang gagachang commented Aug 28, 2023

Separate string from .text section.
Therefore rv32emu instruction decoder would not decode the string and get unknown instructions.

Close #191

Copy link
Contributor

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Append Close #191 at the end of git commit message, so that the latter can be automatically closed once this pull request is merged.

The compiler mixes .text and .data section, that is, the string "Hello
World!\n" is mixed into .text section. The rv32emu instruction decoder
can not decode the string. That's why rv_histogram gets unknown
instruction. Fix it by putting the string into .rodata section.

Close sysprog21#191
Update prebuilt hello ELF file to fix unknown instruction issue for
rv_histogram.
@gagachang
Copy link
Contributor Author

Append Close #191 at the end of git commit message, so that the latter can be automatically closed once this pull request is merged.

Done. Appended in 830ada7

@jserv jserv merged commit 14c4b58 into sysprog21:master Aug 28, 2023
@jserv
Copy link
Contributor

jserv commented Aug 28, 2023

Thank @gagachang for contributing!

vestata pushed a commit to vestata/rv32emu that referenced this pull request Jan 24, 2025
Try to fix rv_histogram behaves weird on build/hello.elf
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rv_histogram behaves weird on build/hello.elf
3 participants