-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(svm): more SBPFv3 support and add Poseidon Hash syscall (#566)
* svm: add a CLI for changing the version * svm: fixup version and add a zig file for `syscall_static.so` * svm: overhaul the ELF parser for V3 support * svm: implement poseidon syscall * svm: implement the rest of the V2 memory operations * svm: fix up negative call labels * svm: add the rest of the poseidon syscall tests * cleanup some random stuff * svm.elf: cleanup validate * svm: add some ELF parser tests * ci: remove cache workaround with `build.zig.zon` update
- Loading branch information
1 parent
7c39406
commit 024cd52
Showing
39 changed files
with
1,350 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,49 @@ | ||
PHDRS | ||
{ | ||
text PT_LOAD ; | ||
rodata PT_LOAD ; | ||
data PT_LOAD ; | ||
dynamic PT_DYNAMIC ; | ||
} | ||
ENTRY ( entrypoint ) | ||
SECTIONS | ||
{ | ||
. = SIZEOF_HEADERS; | ||
.text : { *(.text*) } :text | ||
.rodata : { *(.rodata*) } :rodata | ||
.data.rel.ro : { *(.data.rel.ro*) } :rodata | ||
.dynamic : { *(.dynamic) } :dynamic | ||
.dynsym : { *(.dynsym) } :data | ||
.dynstr : { *(.dynstr) } :data | ||
.rel.dyn : { *(.rel.dyn) } :data | ||
.data : { *(.data*) } :data | ||
.bss : { *(.bss*) } :data | ||
.text 0x000000000 : { | ||
*(.text*) | ||
} :text | ||
.rodata 0x100000000 : { | ||
*(.rodata*) | ||
*(.data.rel.ro*) | ||
BYTE(0); | ||
. = ALIGN(8); | ||
} :rodata | ||
.bss.stack 0x200000000 (NOLOAD) : { | ||
_stack_start = .; | ||
. = . + 0x1000; | ||
_stack_end = .; | ||
. = ALIGN(8); | ||
} :stack | ||
.bss.heap 0x300000000 (NOLOAD) : { | ||
_heap_start = .; | ||
. = . + 0x1000; | ||
_heap_end = .; | ||
. = ALIGN(8); | ||
} :heap | ||
.dynsym 0xFFFFFFFF00000000 : { | ||
*(.dynsym) | ||
. = ALIGN(8); | ||
} :dynsym | ||
.strtab : { *(.strtab) } :other | ||
.dynstr : { *(.dynstr) } :other | ||
/DISCARD/ : { | ||
*(.comment*) | ||
*(.eh_frame*) | ||
*(.gnu.hash*) | ||
*(.hash*) | ||
*(*hash*) | ||
*(.bss*) | ||
*(.data*) | ||
*(.rel.dyn*) | ||
*(.dynamic) | ||
} | ||
} | ||
|
||
PHDRS | ||
{ | ||
text PT_LOAD FLAGS(1); | ||
rodata PT_LOAD FLAGS(4); | ||
stack PT_GNU_STACK FLAGS(6); | ||
heap PT_LOAD FLAGS(6); | ||
dynsym PT_NULL FLAGS(0); | ||
other PT_NULL FLAGS(0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
PHDRS | ||
{ | ||
text PT_LOAD ; | ||
rodata PT_LOAD ; | ||
data PT_LOAD ; | ||
dynamic PT_DYNAMIC ; | ||
} | ||
|
||
SECTIONS | ||
{ | ||
. = SIZEOF_HEADERS; | ||
.text : { *(.text*) } :text | ||
.rodata : { *(.rodata*) } :rodata | ||
.data.rel.ro : { *(.data.rel.ro*) } :rodata | ||
.dynamic : { *(.dynamic) } :dynamic | ||
.dynsym : { *(.dynsym) } :data | ||
.dynstr : { *(.dynstr) } :data | ||
.rel.dyn : { *(.rel.dyn) } :data | ||
.data : { *(.data*) } :data | ||
.bss : { *(.bss*) } :data | ||
/DISCARD/ : { | ||
*(.eh_frame*) | ||
*(.gnu.hash*) | ||
*(.hash*) | ||
} | ||
} |
Binary file not shown.
Oops, something went wrong.