Comments (2)
Spike specifies the symbol table in the ELF file to figure out how to write the target binary into its main memory region.
You may want to check that your ELF has that address is in a PT_LOAD segment.
Btw, Spike figures out the start PC from the ELF by looking at the e_entry
field in the header. You don't have to use --pc
to override the start pc if e_entry
already points to the address you want
from riscv-isa-sim.
Thanks for the answer I did not know about the PT_LOAD
Yes but I use the programm for other purpose that just spike and I don't want to modify all my sections.
I have modified my section as followed :
Elf file type is EXEC (Executable file)
Entry point 0x80001000
There are 2 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0xc0000000 0xc0000000 0x02078 0x02078 R E 0x1000
LOAD 0x000000 0x00000000 0x80000000 0x00074 0x00074 R E 0x1000
Section to Segment mapping:
Segment Sections...
00 .text .tohost
01
But when I look into address 0x80000000 it is still empty, btw my linker look like this :
seg_reset = 0x80001000;
seg_user = 0xC0001000;
ENTRY(_reset)
PHDRS
{
user PT_LOAD FILEHDR PHDRS FLAGS(5);
system PT_LOAD FILEHDR PHDRS AT(seg_reset - 0x1000) FLAGS(5);
}
SECTIONS
{
. = seg_reset;
.reset : { *(.reset) } : system
. = ALIGN(0x1000);
.kernel : { *(.kernel) } : system
. = ALIGN(0x1000);
.exit : { *(.exit) } : system
. = seg_user;
.text : { *(.text) } : user
. = ALIGN(0x1000);
.tohost : { *(.tohost) }
. = ALIGN(0x1000);
.data : { *(.data) }
.data.string : { *(.data.string)}
.bss : { *(.bss) }
_end = .;
}
from riscv-isa-sim.
Related Issues (20)
- [BUG] Entering interactive mode breaks UART input
- [BUG] instruction bugs for RV32 isa HOT 5
- Supporting variable XLEN HOT 3
- mseccfg useed and sseed bits cannot be modified when zkr is implemented
- [BUG] Spike incorrectly executes V extension instructions when vsstatus.vs is off and V=1. HOT 3
- frm is illegal value , a vector fp inst raise illegal inst but it still will make vs dirty HOT 1
- For the vfmv.v.f, fmv.w.x, fmv.x.w instructions, should spike consistently ignore the higher 32 bits when processing single-precision floating-point numbers? HOT 3
- mcontrol6.timing bit is set HOT 4
- Counter-intuitive MMIO device arguments behavior HOT 3
- reading mtinst gives illegal instruction exception HOT 1
- Spike setting VTYPE to 0x8000000000000000 for e16 mf8 HOT 1
- How can I read content from a file and use it as input for an ELF file HOT 4
- misa is not printed by the instruction csrrci HOT 1
- satp written with an unsupported MODE should have no effect HOT 7
- mstatus.fs cannot be written as initial HOT 2
- spike doesn't update sepc and stval in virtual address mode HOT 5
- Why misaligned store will raise store/amo access fault at the function store_slow_path? HOT 3
- Zfa extension instruction fcvtmod_w_d behavior conflict with sail model on too large/ too small boundary HOT 2
- Parse Zve/Zvl to determine RVV settings, instead of --varch HOT 2
- Build fails with "error: 'L_tmpnam' was not declared in this scope" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from riscv-isa-sim.