13993 Commits

Author SHA1 Message Date
Jakub Konka
17215bd2c8 macho: insert global symbol name into the correct strtab 2024-01-28 10:02:28 +01:00
Jakub Konka
8cdaaa7b4f macho: move getAtomData switch into Atom 2024-01-28 00:49:59 +01:00
Jakub Konka
6337ce16ae macho: do not allocate input files in full 2024-01-28 00:40:50 +01:00
Jakub Konka
d5fc3c635a
Merge pull request #18677 from ziglang/post-new-macho
macho: fix logic for parsing dependent dylibs aka re-exports
2024-01-27 01:49:54 +01:00
Andrew Kelley
b96fb858c8
Merge pull request #18654 from mlugg/incremental-the-second
InternPool: introduce TrackedInst to prepare for incremental compilation
2024-01-26 15:51:33 -08:00
Krzysztof Wolicki
61ba225709
Sema: tuples have no names to be used for reporting errors in finishStructInit 2024-01-26 15:22:15 +02:00
Jacob Young
bea958df4d Compilation: preserve "builtin" as the first dependency
Previously, sorting dependencies would reorder the builtin dependency
and cause `Package.Module.getBuiltinDependency` to stop working.
2024-01-25 22:20:34 -08:00
Jakub Konka
ce58f68903 elf: merge all mergeable string rodata sections into one 2024-01-26 05:48:32 +01:00
Jakub Konka
d62e7bbefd macho: unify accessLibPath with accessLibPath2 2024-01-25 12:07:04 +01:00
Jakub Konka
dc9b6ecb55 macho: refactor resolving libs and frameworks when searching dependent dylibs 2024-01-25 12:07:04 +01:00
Jakub Konka
51d60d1a60 macho: dump print search lib and framework dirs in --verbose-link 2024-01-25 12:07:04 +01:00
Jakub Konka
dc4ef6d5d0 macho: try frameworks before libs non-exclusive 2024-01-25 12:07:04 +01:00
Jakub Konka
d8d6ea6af2 macho: print tried paths for unresolved dylib deps 2024-01-25 12:07:04 +01:00
Jakub Konka
0fd0b765fa macho: set __DATA_CONST* segments flags to SG_READ_ONLY 2024-01-24 12:48:22 +01:00
Jakub Konka
47dd8d0cf7 macho: clean up logic for deciding if needs __stub_helper 2024-01-24 12:40:01 +01:00
Jakub Konka
508ff1dd14 macho: add misc fixes targeting macos 11 2024-01-24 12:34:42 +01:00
Jakub Konka
e69ffcd8c1 macho: set filename as ident in code signature 2024-01-24 12:34:42 +01:00
Jakub Konka
46bc91ade5 macho: skip -r when single input object file
This is to ensure we don't unnecessarily strip debug info from
the final relocatable input file, so just copy the file out for now.
2024-01-24 12:34:42 +01:00
Jakub Konka
f2dce0c337 macho: exclude symbols from empty sections when parsing unwind info 2024-01-24 12:34:42 +01:00
Jakub Konka
82628dd151 macho: synthesise unwind records from __eh_frame even if no __compact_unwind 2024-01-24 12:34:42 +01:00
Jakub Konka
fe19d1e09b macho: allocate segments in sep step and tweak sorting logic 2024-01-24 12:34:42 +01:00
Jakub Konka
06224c23b7 macho: fix 32bit compilation issues 2024-01-24 12:34:42 +01:00
Jakub Konka
67ea039426 macho: do not enforce platform check for now 2024-01-24 12:34:42 +01:00
Jakub Konka
060406a526 macho: ensure we zero-out regions after copying them over
This is to ensure that the loader correctly zeroes-out zerofill
sections when mapping them. For context, Apple's loader dyld
will map the regions where any zerofill would theoretically reside
as belonging to zerofill section.
2024-01-24 12:34:42 +01:00
Jakub Konka
3a6410959c macho: actually lower TLS variables 2024-01-24 12:34:42 +01:00
Jakub Konka
411c7f6669 macho: fix wrong symbol type for TLV vars 2024-01-24 12:34:42 +01:00
Jakub Konka
5c4db4e578 x86_64: emit MachO TLV sequence 2024-01-24 12:34:42 +01:00
Jakub Konka
080ad94249 x86_64: save TLS to stack for MachO 2024-01-24 12:34:42 +01:00
Jakub Konka
6ad4062bf2 macho: save TLS variables in ZigObject 2024-01-24 12:34:42 +01:00
Jakub Konka
c02a603b63 macho: get start index of Zig sections when allocating other sections 2024-01-24 12:34:42 +01:00
Jakub Konka
55f57ceb2e macho: prep for lowering TLS variables 2024-01-24 12:34:42 +01:00
Jakub Konka
5c30c23fc4 macho: get rid of allocateSegments 2024-01-24 12:34:42 +01:00
Jakub Konka
aef2c91d9f macho: move incr Zig sections in file if overlap nonincr sections 2024-01-24 12:34:42 +01:00
Jakub Konka
a531ecf9dc macho: refactor segment creation logic 2024-01-24 12:34:42 +01:00
Jakub Konka
eaf4bb4423 macho: fix not resetting __got_zig sect index after sorting headers 2024-01-24 12:34:42 +01:00
Jakub Konka
8f74d2519f macho: resolve relocs pointing at __got_zig 2024-01-24 12:34:41 +01:00
Jakub Konka
a112241f64 macho: re-read atom code from ZigObject when resolving relocs 2024-01-24 12:34:41 +01:00
Jakub Konka
7647db3273 macho: reserve space for __got_zig rebase opcodes 2024-01-24 12:34:41 +01:00
Jakub Konka
16b66588f0 macho: allocate __LINKEDIT in a separate pass 2024-01-24 12:34:41 +01:00
Jakub Konka
f4da814535 macho: init linkedit segment separately 2024-01-24 12:34:41 +01:00
Jakub Konka
1bdcb23b13 macho: allocate sections and segments that need it 2024-01-24 12:34:41 +01:00
Jakub Konka
0143dd8fdc macho: fix '_' prefixing rules for exports 2024-01-24 12:34:41 +01:00
Jakub Konka
5c951cd211 macho: again fix symbol index dereference in codegen wrt ZigObject 2024-01-24 12:34:41 +01:00
Jakub Konka
a8629fb850 macho: fix symbol index dereference in codegen wrt ZigObject
This is incredibly confusing and I really need to simplify it.
Elf also possesses this shortcoming so once I get Coff up to speed
it should hopefully become clear on how to refactor this.
2024-01-24 12:34:41 +01:00
Jakub Konka
30b7d3e45f macho: implement resolveSymbols in ZigObject 2024-01-24 12:34:41 +01:00
Jakub Konka
5ef63e333a macho: set atom_index for newly created Atom in ZigObject 2024-01-24 12:34:41 +01:00
Jakub Konka
5d0ea3fd27 macho: let us dump some state and debug! 2024-01-24 12:34:41 +01:00
Jakub Konka
9a78173ee0 macho: implement ZigObject.flushModule 2024-01-24 12:34:41 +01:00
Jakub Konka
a79a038e61 codegen: implement more missing bits 2024-01-24 12:34:41 +01:00
Jakub Konka
96cc9fafbf codegen: re-implement enough of codegen to error out instead panic 2024-01-24 12:34:41 +01:00