| ... | ... | @@ -1282,10 +1282,17 @@ pub fn commitDeclState( |
| 1282 | 1282 | try pwriteDbgLineNops(elf_file.base.file.?, file_pos, 0, &[0]u8{}, src_fn.len); |
| 1283 | 1283 | }, |
| 1284 | 1284 | .macho => { |
| 1285 | | const d_sym = self.bin_file.cast(File.MachO).?.getDebugSymbols().?; |
| 1286 | | const debug_line_sect = d_sym.getSectionPtr(d_sym.debug_line_section_index.?); |
| 1287 | | const file_pos = debug_line_sect.offset + src_fn.off; |
| 1288 | | try pwriteDbgLineNops(d_sym.file, file_pos, 0, &[0]u8{}, src_fn.len); |
| 1285 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 1286 | if (macho_file.base.isRelocatable()) { |
| 1287 | const debug_line_sect = &macho_file.sections.items(.header)[macho_file.debug_line_sect_index.?]; |
| 1288 | const file_pos = debug_line_sect.offset + src_fn.off; |
| 1289 | try pwriteDbgLineNops(macho_file.base.file.?, file_pos, 0, &[0]u8{}, src_fn.len); |
| 1290 | } else { |
| 1291 | const d_sym = macho_file.getDebugSymbols().?; |
| 1292 | const debug_line_sect = d_sym.getSectionPtr(d_sym.debug_line_section_index.?); |
| 1293 | const file_pos = debug_line_sect.offset + src_fn.off; |
| 1294 | try pwriteDbgLineNops(d_sym.file, file_pos, 0, &[0]u8{}, src_fn.len); |
| 1295 | } |
| 1289 | 1296 | }, |
| 1290 | 1297 | .wasm => { |
| 1291 | 1298 | const wasm_file = self.bin_file.cast(File.Wasm).?; |
| ... | ... | @@ -1352,18 +1359,32 @@ pub fn commitDeclState( |
| 1352 | 1359 | |
| 1353 | 1360 | .macho => { |
| 1354 | 1361 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 1355 | | const d_sym = macho_file.getDebugSymbols().?; |
| 1356 | | const sect_index = d_sym.debug_line_section_index.?; |
| 1357 | | try d_sym.growSection(sect_index, needed_size, true, macho_file); |
| 1358 | | const sect = d_sym.getSection(sect_index); |
| 1359 | | const file_pos = sect.offset + src_fn.off; |
| 1360 | | try pwriteDbgLineNops( |
| 1361 | | d_sym.file, |
| 1362 | | file_pos, |
| 1363 | | prev_padding_size, |
| 1364 | | dbg_line_buffer.items, |
| 1365 | | next_padding_size, |
| 1366 | | ); |
| 1362 | if (macho_file.base.isRelocatable()) { |
| 1363 | const sect_index = macho_file.debug_line_sect_index.?; |
| 1364 | try macho_file.growSection(sect_index, needed_size); |
| 1365 | const sect = macho_file.sections.items(.header)[sect_index]; |
| 1366 | const file_pos = sect.offset + src_fn.off; |
| 1367 | try pwriteDbgLineNops( |
| 1368 | macho_file.base.file.?, |
| 1369 | file_pos, |
| 1370 | prev_padding_size, |
| 1371 | dbg_line_buffer.items, |
| 1372 | next_padding_size, |
| 1373 | ); |
| 1374 | } else { |
| 1375 | const d_sym = macho_file.getDebugSymbols().?; |
| 1376 | const sect_index = d_sym.debug_line_section_index.?; |
| 1377 | try d_sym.growSection(sect_index, needed_size, true, macho_file); |
| 1378 | const sect = d_sym.getSection(sect_index); |
| 1379 | const file_pos = sect.offset + src_fn.off; |
| 1380 | try pwriteDbgLineNops( |
| 1381 | d_sym.file, |
| 1382 | file_pos, |
| 1383 | prev_padding_size, |
| 1384 | dbg_line_buffer.items, |
| 1385 | next_padding_size, |
| 1386 | ); |
| 1387 | } |
| 1367 | 1388 | }, |
| 1368 | 1389 | |
| 1369 | 1390 | .wasm => { |
| ... | ... | @@ -1460,16 +1481,21 @@ pub fn commitDeclState( |
| 1460 | 1481 | while (decl_state.exprloc_relocs.popOrNull()) |reloc| { |
| 1461 | 1482 | switch (self.bin_file.tag) { |
| 1462 | 1483 | .macho => { |
| 1463 | | const d_sym = self.bin_file.cast(File.MachO).?.getDebugSymbols().?; |
| 1464 | | try d_sym.relocs.append(d_sym.allocator, .{ |
| 1465 | | .type = switch (reloc.type) { |
| 1466 | | .direct_load => .direct_load, |
| 1467 | | .got_load => .got_load, |
| 1468 | | }, |
| 1469 | | .target = reloc.target, |
| 1470 | | .offset = reloc.offset + self.getAtom(.di_atom, di_atom_index).off, |
| 1471 | | .addend = 0, |
| 1472 | | }); |
| 1484 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 1485 | if (macho_file.base.isRelocatable()) { |
| 1486 | // TODO |
| 1487 | } else { |
| 1488 | const d_sym = macho_file.getDebugSymbols().?; |
| 1489 | try d_sym.relocs.append(d_sym.allocator, .{ |
| 1490 | .type = switch (reloc.type) { |
| 1491 | .direct_load => .direct_load, |
| 1492 | .got_load => .got_load, |
| 1493 | }, |
| 1494 | .target = reloc.target, |
| 1495 | .offset = reloc.offset + self.getAtom(.di_atom, di_atom_index).off, |
| 1496 | .addend = 0, |
| 1497 | }); |
| 1498 | } |
| 1473 | 1499 | }, |
| 1474 | 1500 | .elf => {}, // TODO |
| 1475 | 1501 | else => unreachable, |
| ... | ... | @@ -1512,10 +1538,17 @@ fn updateDeclDebugInfoAllocation(self: *Dwarf, atom_index: Atom.Index, len: u32) |
| 1512 | 1538 | try pwriteDbgInfoNops(elf_file.base.file.?, file_pos, 0, &[0]u8{}, atom.len, false); |
| 1513 | 1539 | }, |
| 1514 | 1540 | .macho => { |
| 1515 | | const d_sym = self.bin_file.cast(File.MachO).?.getDebugSymbols().?; |
| 1516 | | const debug_info_sect = d_sym.getSectionPtr(d_sym.debug_info_section_index.?); |
| 1517 | | const file_pos = debug_info_sect.offset + atom.off; |
| 1518 | | try pwriteDbgInfoNops(d_sym.file, file_pos, 0, &[0]u8{}, atom.len, false); |
| 1541 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 1542 | if (macho_file.base.isRelocatable()) { |
| 1543 | const debug_info_sect = macho_file.sections.items(.header)[macho_file.debug_info_sect_index.?]; |
| 1544 | const file_pos = debug_info_sect.offset + atom.off; |
| 1545 | try pwriteDbgInfoNops(macho_file.base.file.?, file_pos, 0, &[0]u8{}, atom.len, false); |
| 1546 | } else { |
| 1547 | const d_sym = macho_file.getDebugSymbols().?; |
| 1548 | const debug_info_sect = d_sym.getSectionPtr(d_sym.debug_info_section_index.?); |
| 1549 | const file_pos = debug_info_sect.offset + atom.off; |
| 1550 | try pwriteDbgInfoNops(d_sym.file, file_pos, 0, &[0]u8{}, atom.len, false); |
| 1551 | } |
| 1519 | 1552 | }, |
| 1520 | 1553 | .wasm => { |
| 1521 | 1554 | const wasm_file = self.bin_file.cast(File.Wasm).?; |
| ... | ... | @@ -1599,19 +1632,34 @@ fn writeDeclDebugInfo(self: *Dwarf, atom_index: Atom.Index, dbg_info_buf: []cons |
| 1599 | 1632 | |
| 1600 | 1633 | .macho => { |
| 1601 | 1634 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 1602 | | const d_sym = macho_file.getDebugSymbols().?; |
| 1603 | | const sect_index = d_sym.debug_info_section_index.?; |
| 1604 | | try d_sym.growSection(sect_index, needed_size, true, macho_file); |
| 1605 | | const sect = d_sym.getSection(sect_index); |
| 1606 | | const file_pos = sect.offset + atom.off; |
| 1607 | | try pwriteDbgInfoNops( |
| 1608 | | d_sym.file, |
| 1609 | | file_pos, |
| 1610 | | prev_padding_size, |
| 1611 | | dbg_info_buf, |
| 1612 | | next_padding_size, |
| 1613 | | trailing_zero, |
| 1614 | | ); |
| 1635 | if (macho_file.base.isRelocatable()) { |
| 1636 | const sect_index = macho_file.debug_info_sect_index.?; |
| 1637 | try macho_file.growSection(sect_index, needed_size); |
| 1638 | const sect = macho_file.sections.items(.header)[sect_index]; |
| 1639 | const file_pos = sect.offset + atom.off; |
| 1640 | try pwriteDbgInfoNops( |
| 1641 | macho_file.base.file.?, |
| 1642 | file_pos, |
| 1643 | prev_padding_size, |
| 1644 | dbg_info_buf, |
| 1645 | next_padding_size, |
| 1646 | trailing_zero, |
| 1647 | ); |
| 1648 | } else { |
| 1649 | const d_sym = macho_file.getDebugSymbols().?; |
| 1650 | const sect_index = d_sym.debug_info_section_index.?; |
| 1651 | try d_sym.growSection(sect_index, needed_size, true, macho_file); |
| 1652 | const sect = d_sym.getSection(sect_index); |
| 1653 | const file_pos = sect.offset + atom.off; |
| 1654 | try pwriteDbgInfoNops( |
| 1655 | d_sym.file, |
| 1656 | file_pos, |
| 1657 | prev_padding_size, |
| 1658 | dbg_info_buf, |
| 1659 | next_padding_size, |
| 1660 | trailing_zero, |
| 1661 | ); |
| 1662 | } |
| 1615 | 1663 | }, |
| 1616 | 1664 | |
| 1617 | 1665 | .wasm => { |
| ... | ... | @@ -1672,10 +1720,17 @@ pub fn updateDeclLineNumber(self: *Dwarf, mod: *Module, decl_index: InternPool.D |
| 1672 | 1720 | try elf_file.base.file.?.pwriteAll(&data, file_pos); |
| 1673 | 1721 | }, |
| 1674 | 1722 | .macho => { |
| 1675 | | const d_sym = self.bin_file.cast(File.MachO).?.getDebugSymbols().?; |
| 1676 | | const sect = d_sym.getSection(d_sym.debug_line_section_index.?); |
| 1677 | | const file_pos = sect.offset + atom.off + self.getRelocDbgLineOff(); |
| 1678 | | try d_sym.file.pwriteAll(&data, file_pos); |
| 1723 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 1724 | if (macho_file.base.isRelocatable()) { |
| 1725 | const sect = macho_file.sections.items(.header)[macho_file.debug_line_sect_index.?]; |
| 1726 | const file_pos = sect.offset + atom.off + self.getRelocDbgLineOff(); |
| 1727 | try macho_file.base.file.?.pwriteAll(&data, file_pos); |
| 1728 | } else { |
| 1729 | const d_sym = macho_file.getDebugSymbols().?; |
| 1730 | const sect = d_sym.getSection(d_sym.debug_line_section_index.?); |
| 1731 | const file_pos = sect.offset + atom.off + self.getRelocDbgLineOff(); |
| 1732 | try d_sym.file.pwriteAll(&data, file_pos); |
| 1733 | } |
| 1679 | 1734 | }, |
| 1680 | 1735 | .wasm => { |
| 1681 | 1736 | const wasm_file = self.bin_file.cast(File.Wasm).?; |
| ... | ... | @@ -1880,12 +1935,20 @@ pub fn writeDbgAbbrev(self: *Dwarf) !void { |
| 1880 | 1935 | }, |
| 1881 | 1936 | .macho => { |
| 1882 | 1937 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 1883 | | const d_sym = macho_file.getDebugSymbols().?; |
| 1884 | | const sect_index = d_sym.debug_abbrev_section_index.?; |
| 1885 | | try d_sym.growSection(sect_index, needed_size, false, macho_file); |
| 1886 | | const sect = d_sym.getSection(sect_index); |
| 1887 | | const file_pos = sect.offset + abbrev_offset; |
| 1888 | | try d_sym.file.pwriteAll(&abbrev_buf, file_pos); |
| 1938 | if (macho_file.base.isRelocatable()) { |
| 1939 | const sect_index = macho_file.debug_abbrev_sect_index.?; |
| 1940 | try macho_file.growSection(sect_index, needed_size); |
| 1941 | const sect = macho_file.sections.items(.header)[sect_index]; |
| 1942 | const file_pos = sect.offset + abbrev_offset; |
| 1943 | try macho_file.base.file.?.pwriteAll(&abbrev_buf, file_pos); |
| 1944 | } else { |
| 1945 | const d_sym = macho_file.getDebugSymbols().?; |
| 1946 | const sect_index = d_sym.debug_abbrev_section_index.?; |
| 1947 | try d_sym.growSection(sect_index, needed_size, false, macho_file); |
| 1948 | const sect = d_sym.getSection(sect_index); |
| 1949 | const file_pos = sect.offset + abbrev_offset; |
| 1950 | try d_sym.file.pwriteAll(&abbrev_buf, file_pos); |
| 1951 | } |
| 1889 | 1952 | }, |
| 1890 | 1953 | .wasm => { |
| 1891 | 1954 | const wasm_file = self.bin_file.cast(File.Wasm).?; |
| ... | ... | @@ -1970,10 +2033,17 @@ pub fn writeDbgInfoHeader(self: *Dwarf, zcu: *Module, low_pc: u64, high_pc: u64) |
| 1970 | 2033 | try pwriteDbgInfoNops(elf_file.base.file.?, file_pos, 0, di_buf.items, jmp_amt, false); |
| 1971 | 2034 | }, |
| 1972 | 2035 | .macho => { |
| 1973 | | const d_sym = self.bin_file.cast(File.MachO).?.getDebugSymbols().?; |
| 1974 | | const debug_info_sect = d_sym.getSection(d_sym.debug_info_section_index.?); |
| 1975 | | const file_pos = debug_info_sect.offset; |
| 1976 | | try pwriteDbgInfoNops(d_sym.file, file_pos, 0, di_buf.items, jmp_amt, false); |
| 2036 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 2037 | if (macho_file.base.isRelocatable()) { |
| 2038 | const debug_info_sect = macho_file.sections.items(.header)[macho_file.debug_info_sect_index.?]; |
| 2039 | const file_pos = debug_info_sect.offset; |
| 2040 | try pwriteDbgInfoNops(macho_file.base.file.?, file_pos, 0, di_buf.items, jmp_amt, false); |
| 2041 | } else { |
| 2042 | const d_sym = macho_file.getDebugSymbols().?; |
| 2043 | const debug_info_sect = d_sym.getSection(d_sym.debug_info_section_index.?); |
| 2044 | const file_pos = debug_info_sect.offset; |
| 2045 | try pwriteDbgInfoNops(d_sym.file, file_pos, 0, di_buf.items, jmp_amt, false); |
| 2046 | } |
| 1977 | 2047 | }, |
| 1978 | 2048 | .wasm => { |
| 1979 | 2049 | const wasm_file = self.bin_file.cast(File.Wasm).?; |
| ... | ... | @@ -2296,12 +2366,20 @@ pub fn writeDbgAranges(self: *Dwarf, addr: u64, size: u64) !void { |
| 2296 | 2366 | }, |
| 2297 | 2367 | .macho => { |
| 2298 | 2368 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 2299 | | const d_sym = macho_file.getDebugSymbols().?; |
| 2300 | | const sect_index = d_sym.debug_aranges_section_index.?; |
| 2301 | | try d_sym.growSection(sect_index, needed_size, false, macho_file); |
| 2302 | | const sect = d_sym.getSection(sect_index); |
| 2303 | | const file_pos = sect.offset; |
| 2304 | | try d_sym.file.pwriteAll(di_buf.items, file_pos); |
| 2369 | if (macho_file.base.isRelocatable()) { |
| 2370 | const sect_index = macho_file.debug_aranges_sect_index.?; |
| 2371 | try macho_file.growSection(sect_index, needed_size); |
| 2372 | const sect = macho_file.sections.items(.header)[sect_index]; |
| 2373 | const file_pos = sect.offset; |
| 2374 | try macho_file.base.file.?.pwriteAll(di_buf.items, file_pos); |
| 2375 | } else { |
| 2376 | const d_sym = macho_file.getDebugSymbols().?; |
| 2377 | const sect_index = d_sym.debug_aranges_section_index.?; |
| 2378 | try d_sym.growSection(sect_index, needed_size, false, macho_file); |
| 2379 | const sect = d_sym.getSection(sect_index); |
| 2380 | const file_pos = sect.offset; |
| 2381 | try d_sym.file.pwriteAll(di_buf.items, file_pos); |
| 2382 | } |
| 2305 | 2383 | }, |
| 2306 | 2384 | .wasm => { |
| 2307 | 2385 | const wasm_file = self.bin_file.cast(File.Wasm).?; |
| ... | ... | @@ -2437,16 +2515,28 @@ pub fn writeDbgLineHeader(self: *Dwarf) !void { |
| 2437 | 2515 | }, |
| 2438 | 2516 | .macho => { |
| 2439 | 2517 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 2440 | | const d_sym = macho_file.getDebugSymbols().?; |
| 2441 | | const sect_index = d_sym.debug_line_section_index.?; |
| 2442 | | const needed_size: u32 = @intCast(d_sym.getSection(sect_index).size + delta); |
| 2443 | | try d_sym.growSection(sect_index, needed_size, true, macho_file); |
| 2444 | | const file_pos = d_sym.getSection(sect_index).offset + first_fn.off; |
| 2518 | if (macho_file.base.isRelocatable()) { |
| 2519 | const sect_index = macho_file.debug_line_sect_index.?; |
| 2520 | const needed_size: u32 = @intCast(macho_file.sections.items(.header)[sect_index].size + delta); |
| 2521 | try macho_file.growSection(sect_index, needed_size); |
| 2522 | const file_pos = macho_file.sections.items(.header)[sect_index].offset + first_fn.off; |
| 2445 | 2523 | |
| 2446 | | const amt = try d_sym.file.preadAll(buffer, file_pos); |
| 2447 | | if (amt != buffer.len) return error.InputOutput; |
| 2524 | const amt = try macho_file.base.file.?.preadAll(buffer, file_pos); |
| 2525 | if (amt != buffer.len) return error.InputOutput; |
| 2526 | |
| 2527 | try macho_file.base.file.?.pwriteAll(buffer, file_pos + delta); |
| 2528 | } else { |
| 2529 | const d_sym = macho_file.getDebugSymbols().?; |
| 2530 | const sect_index = d_sym.debug_line_section_index.?; |
| 2531 | const needed_size: u32 = @intCast(d_sym.getSection(sect_index).size + delta); |
| 2532 | try d_sym.growSection(sect_index, needed_size, true, macho_file); |
| 2533 | const file_pos = d_sym.getSection(sect_index).offset + first_fn.off; |
| 2534 | |
| 2535 | const amt = try d_sym.file.preadAll(buffer, file_pos); |
| 2536 | if (amt != buffer.len) return error.InputOutput; |
| 2448 | 2537 | |
| 2449 | | try d_sym.file.pwriteAll(buffer, file_pos + delta); |
| 2538 | try d_sym.file.pwriteAll(buffer, file_pos + delta); |
| 2539 | } |
| 2450 | 2540 | }, |
| 2451 | 2541 | .wasm => { |
| 2452 | 2542 | const wasm_file = self.bin_file.cast(File.Wasm).?; |
| ... | ... | @@ -2492,10 +2582,17 @@ pub fn writeDbgLineHeader(self: *Dwarf) !void { |
| 2492 | 2582 | try pwriteDbgLineNops(elf_file.base.file.?, file_pos, 0, di_buf.items, jmp_amt); |
| 2493 | 2583 | }, |
| 2494 | 2584 | .macho => { |
| 2495 | | const d_sym = self.bin_file.cast(File.MachO).?.getDebugSymbols().?; |
| 2496 | | const debug_line_sect = d_sym.getSection(d_sym.debug_line_section_index.?); |
| 2497 | | const file_pos = debug_line_sect.offset; |
| 2498 | | try pwriteDbgLineNops(d_sym.file, file_pos, 0, di_buf.items, jmp_amt); |
| 2585 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 2586 | if (macho_file.base.isRelocatable()) { |
| 2587 | const debug_line_sect = macho_file.sections.items(.header)[macho_file.debug_line_sect_index.?]; |
| 2588 | const file_pos = debug_line_sect.offset; |
| 2589 | try pwriteDbgLineNops(macho_file.base.file.?, file_pos, 0, di_buf.items, jmp_amt); |
| 2590 | } else { |
| 2591 | const d_sym = macho_file.getDebugSymbols().?; |
| 2592 | const debug_line_sect = d_sym.getSection(d_sym.debug_line_section_index.?); |
| 2593 | const file_pos = debug_line_sect.offset; |
| 2594 | try pwriteDbgLineNops(d_sym.file, file_pos, 0, di_buf.items, jmp_amt); |
| 2595 | } |
| 2499 | 2596 | }, |
| 2500 | 2597 | .wasm => { |
| 2501 | 2598 | const wasm_file = self.bin_file.cast(File.Wasm).?; |
| ... | ... | @@ -2613,9 +2710,15 @@ pub fn flushModule(self: *Dwarf, module: *Module) !void { |
| 2613 | 2710 | break :pos debug_info_sect.sh_offset; |
| 2614 | 2711 | }, |
| 2615 | 2712 | .macho => pos: { |
| 2616 | | const d_sym = self.bin_file.cast(File.MachO).?.getDebugSymbols().?; |
| 2617 | | const debug_info_sect = d_sym.getSectionPtr(d_sym.debug_info_section_index.?); |
| 2618 | | break :pos debug_info_sect.offset; |
| 2713 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 2714 | if (macho_file.base.isRelocatable()) { |
| 2715 | const debug_info_sect = &macho_file.sections.items(.header)[macho_file.debug_info_sect_index.?]; |
| 2716 | break :pos debug_info_sect.offset; |
| 2717 | } else { |
| 2718 | const d_sym = macho_file.getDebugSymbols().?; |
| 2719 | const debug_info_sect = d_sym.getSectionPtr(d_sym.debug_info_section_index.?); |
| 2720 | break :pos debug_info_sect.offset; |
| 2721 | } |
| 2619 | 2722 | }, |
| 2620 | 2723 | // for wasm, the offset is always 0 as we write to memory first |
| 2621 | 2724 | .wasm => 0, |
| ... | ... | @@ -2633,8 +2736,13 @@ pub fn flushModule(self: *Dwarf, module: *Module) !void { |
| 2633 | 2736 | try elf_file.base.file.?.pwriteAll(&buf, file_pos + atom.off + reloc.offset); |
| 2634 | 2737 | }, |
| 2635 | 2738 | .macho => { |
| 2636 | | const d_sym = self.bin_file.cast(File.MachO).?.getDebugSymbols().?; |
| 2637 | | try d_sym.file.pwriteAll(&buf, file_pos + atom.off + reloc.offset); |
| 2739 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 2740 | if (macho_file.base.isRelocatable()) { |
| 2741 | try macho_file.base.file.?.pwriteAll(&buf, file_pos + atom.off + reloc.offset); |
| 2742 | } else { |
| 2743 | const d_sym = macho_file.getDebugSymbols().?; |
| 2744 | try d_sym.file.pwriteAll(&buf, file_pos + atom.off + reloc.offset); |
| 2745 | } |
| 2638 | 2746 | }, |
| 2639 | 2747 | .wasm => { |
| 2640 | 2748 | const wasm_file = self.bin_file.cast(File.Wasm).?; |
| ... | ... | @@ -2659,8 +2767,12 @@ fn addDIFile(self: *Dwarf, mod: *Module, decl_index: InternPool.DeclIndex) !u28 |
| 2659 | 2767 | }, |
| 2660 | 2768 | .macho => { |
| 2661 | 2769 | const macho_file = self.bin_file.cast(File.MachO).?; |
| 2662 | | const d_sym = macho_file.getDebugSymbols().?; |
| 2663 | | d_sym.markDirty(d_sym.debug_line_section_index.?, macho_file); |
| 2770 | if (macho_file.base.isRelocatable()) { |
| 2771 | macho_file.markDirty(macho_file.debug_line_sect_index.?); |
| 2772 | } else { |
| 2773 | const d_sym = macho_file.getDebugSymbols().?; |
| 2774 | d_sym.markDirty(d_sym.debug_line_section_index.?, macho_file); |
| 2775 | } |
| 2664 | 2776 | }, |
| 2665 | 2777 | .wasm => {}, |
| 2666 | 2778 | else => unreachable, |