feat(asm): add .debug_frame CFI section for stack unwinding

Assisted-by: MiMo V2.5 Pro
This commit is contained in:
2026-08-21 01:20:21 +02:00
parent f153be8158
commit 746cef8100
6 changed files with 91 additions and 1 deletions
+3
View File
@@ -226,6 +226,9 @@ func (img *Image) ELFAARCH64Object() ([]byte, error) {
putSh(".debug_info", shtProgbits, 0, dw.infoOff, dw.infoSize, 0, 0, 1, 0)
putSh(".debug_line", shtProgbits, 0, dw.lineOff, dw.lineSize, 0, 0, 1, 0)
putSh(".debug_line_str", shtProgbits, 0, dw.lineStrOff, dw.lineStrSize, 0, 0, 1, 0)
if dw.frameSize > 0 {
putSh(".debug_frame", shtProgbits, 0, dw.frameOff, dw.frameSize, 0, 0, 8, 0)
}
}
// ELF header.