Commit 6cd8591
fix(ovsm): Critical ELF generation fixes for Solana deployment
Fixed 6 critical structural issues in SBPF V1 ELF generation:
1. **Virtual Address Overlap (CRITICAL)**: .rodata and .dynamic had
identical vaddrscausing illegal memory overlap. Fixed vaddr chain.
2. **Missing 4th Program Header**: Added PT_LOAD for .rodata section
to match reference structure (was 3, now 4 headers).
3. **Incorrect PT_LOAD Permissions**: Dynamic sections PT_LOAD was R+W,
changed to R (read-only) matching reference.
4. **Section Header Links**: Fixed sh_link fields after adding .rodata
(.dynamic→.dynstr, .dynsym→.dynstr, .rel.dyn→.dynsym).
5. **DT_RELCOUNT Zero**: Was hardcoded to 0, now correctly set to
syscalls.len() (actual relocation count).
6. **Extra Debug Sections**: Removed .strtab and .symtab sections
(was 10 sections, now 8 matching reference - not needed for deploy).
Current Status:
- ✅ ELF structure matches reference programs
- ✅ All readelf warnings eliminated
- ✅ Local test validator gives different error (ELF validation passes)
- ❌ Devnet still rejects with "invalid dynamic section table"
Remaining issue likely network-specific validation in Agave 4.0.
See ELF_DEPLOYMENT_DEBUG_REPORT.md for full analysis.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent ad954a5 commit 6cd8591
File tree
2 files changed
+173
-41
lines changed- crates/ovsm/src/compiler
2 files changed
+173
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
| 307 | + | |
311 | 308 | | |
312 | 309 | | |
313 | 310 | | |
| |||
327 | 324 | | |
328 | 325 | | |
329 | 326 | | |
330 | | - | |
| 327 | + | |
331 | 328 | | |
332 | 329 | | |
333 | 330 | | |
| |||
356 | 353 | | |
357 | 354 | | |
358 | 355 | | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
| 356 | + | |
| 357 | + | |
370 | 358 | | |
371 | 359 | | |
372 | 360 | | |
373 | 361 | | |
374 | 362 | | |
375 | | - | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
376 | 366 | | |
377 | 367 | | |
378 | 368 | | |
| |||
412 | 402 | | |
413 | 403 | | |
414 | 404 | | |
415 | | - | |
416 | 405 | | |
417 | 406 | | |
418 | 407 | | |
| |||
504 | 493 | | |
505 | 494 | | |
506 | 495 | | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | 496 | | |
| 497 | + | |
522 | 498 | | |
523 | 499 | | |
524 | 500 | | |
| |||
554 | 530 | | |
555 | 531 | | |
556 | 532 | | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
| 533 | + | |
566 | 534 | | |
567 | 535 | | |
568 | 536 | | |
| |||
0 commit comments