aboutsummaryrefslogtreecommitdiff
path: root/zkvms/nexus/guest/guest.ld
diff options
context:
space:
mode:
authorKamen Mladenov <kamen@syndamia.com>2025-03-21 13:04:30 +0200
committerKamen Mladenov <kamen@syndamia.com>2025-04-04 11:03:00 +0300
commite7018851c4b5c44c7e6b7e907ffc186b1da5c9f4 (patch)
treeaf4aad265dc10a5a6973c9b8f7e76c30686bafa6 /zkvms/nexus/guest/guest.ld
parent023070de2dde4df9b809cf04ff09ab1a3af3e01c (diff)
downloadzkVMs-benchmarks-e7018851c4b5c44c7e6b7e907ffc186b1da5c9f4.tar
zkVMs-benchmarks-e7018851c4b5c44c7e6b7e907ffc186b1da5c9f4.tar.gz
zkVMs-benchmarks-e7018851c4b5c44c7e6b7e907ffc186b1da5c9f4.zip
feat(zkvms/nexus): Update SDK usage
Update according to their new methods.
Diffstat (limited to 'zkvms/nexus/guest/guest.ld')
-rw-r--r--zkvms/nexus/guest/guest.ld28
1 files changed, 5 insertions, 23 deletions
diff --git a/zkvms/nexus/guest/guest.ld b/zkvms/nexus/guest/guest.ld
index 5a4dd4a..384c76c 100644
--- a/zkvms/nexus/guest/guest.ld
+++ b/zkvms/nexus/guest/guest.ld
@@ -1,14 +1,12 @@
ENTRY(_start);
+/* nb: when proving we will rebuild the memory model based on the first
+ pass' usages, so there is no cost for a "suboptimal" layout here */
+
SECTIONS
{
- /* Set the default size of the stack. */
- /* */
- /* Because the stack will grow down from this point, and if the heap requests memory */
- /* being used by the stack then the runtime will panic, this value also functions as */
- /* the memory limit for the guest program execution more generally. */
- __memory_top = 0x6400000;
- . = 0;
+ __memory_top = 0x80400000;
+ . = 0x1000;
.text : ALIGN(4)
{
@@ -19,7 +17,6 @@ SECTIONS
}
. = ALIGN(8);
- . = .* 2;
.data : ALIGN(4)
{
@@ -44,14 +41,6 @@ SECTIONS
_end = .;
}
- /* Dynamic relocations are unsupported. This section is only used to detect
- relocatable code in the input files and raise an error if relocatable code
- is found */
- .got (INFO) :
- {
- KEEP(*(.got .got.*));
- }
-
/DISCARD/ :
{
*(.comment*)
@@ -64,10 +53,3 @@ SECTIONS
}
ASSERT(. < __memory_top, "Program is too large for the VM memory.");
-
-ASSERT(SIZEOF(.got) == 0, "
-.got section detected in the input files. Dynamic relocations are not
-supported. If you are linking to C code compiled using the `gcc` crate
-then modify your build script to compile the C code _without_ the
--fPIC flag. See the documentation of the `gcc::Config.fpic` method for
-details.");