aboutsummaryrefslogtreecommitdiff
path: root/src/link/MachO
AgeCommit message (Collapse)Author
2024-01-24macho: remove all rpath parsing from the linkerJakub Konka
2024-01-24macho: fix invalid generation of FDE recordsJakub Konka
2024-01-24macho: preserve section name for code sectionsJakub Konka
2024-01-24macho: fix dead stripping logic to exclude debug sectionsJakub Konka
2024-01-24macho: re-instate build-obj codepathJakub Konka
2024-01-24macho: report duplicate symbolsJakub Konka
2024-01-24macho: write to fileJakub Konka
2024-01-24macho: allocate sections, segments and atomsJakub Konka
2024-01-24macho: sort sections; use Atom.Alignment for alignment; init segmentsJakub Konka
2024-01-24macho: report undefined symbols to the userJakub Konka
2024-01-24macho: handle dead stripping of atomsJakub Konka
2024-01-24macho: resolve synthetic symbolsJakub Konka
2024-01-24macho: resolve symbols and mark files liveJakub Konka
2024-01-24macho: parse tbdsJakub Konka
2024-01-24macho: parse dylibsJakub Konka
2024-01-24macho: parse archivesJakub Konka
2024-01-24macho: create scaffolding for parsing different input objectsJakub Konka
2024-01-24macho: parse an input object file!Jakub Konka
2024-01-24macho: get the ball rolling!Jakub Konka
2024-01-24macho: copy over new implementation sources from zldJakub Konka
2024-01-22std.io: replace readStructBig with readStructEndianTristan Ross
2024-01-09Add support for `--(no-)undefined-version`dhash
Co-authored-by: Motiejus Jakštys <motiejus@jakstys.lt> Co-authored-by: Jakub Konka <kubkon@jakubkonka.com> Co-authored-by: Samuel Cantero <scanterog@gmail.com> Co-authored-by: Giorgos Georgiou <giorgos.georgiou@datadoghq.com> Co-authored-by: Carl Åstholm <carl@astholm.se>
2024-01-08Use a fixed chunk size when calculating MachO UUIDJeremy Volkman
2024-01-01link: accept the update arena in flushAndrew Kelley
This branch introduced an arena allocator for temporary allocations in Compilation.update. Almost every implementation of flush() inside the linker code was already creating a local arena that had the lifetime of the function call. This commit passes the update arena so that all those local ones can be deleted, resulting in slightly more efficient memory usage with every compilation update. While at it, this commit also removes the Compilation parameter from the linker flush function API since a reference to the Compilation is now already stored in `link.File`.
2024-01-01move force_undefined_symbols into CompilationAndrew Kelley
This field is needed by Compilation regardless of whether a link file is instantiated. Fixes an invalid check for bin_file=null.
2024-01-01compiler: push entry symbol name resolution into the linkerAndrew Kelley
This is necessary because on COFF, the entry symbol name is not known until the linker has looked at the set of global symbol names to determine which of the four possible main entry points is present.
2024-01-01linker: rename intermediary_basname to zcu_object_sub_pathAndrew Kelley
2024-01-01fix remaining compile errors except oneAndrew Kelley
2024-01-01fix a round of compile errors caused by this branchAndrew Kelley
2024-01-01compiler: update many references to bin_file.optionsAndrew Kelley
2024-01-01linkers: update references to "options" fieldAndrew Kelley
2024-01-01linker: update target referencesAndrew Kelley
2024-01-01linker: update output_mode referencesAndrew Kelley
2024-01-01move a large chunk of linker logic away from "options"Andrew Kelley
These options are only supposed to be provided to the initialization functions, resolved, and then computed values stored in the appropriate place (base struct or the object-format-specific structs). Many more to go...
2023-11-29Remove all usages of `std.mem.copy` and remove `std.mem.set` (#18143)David Rubin
2023-11-19compiler: correct unnecessary uses of 'var'mlugg
2023-11-17std.macho: fix LoadCommandIterator to work with underaligned dataJakub Konka
2023-11-10macho: resolve special section/segment boundary symbolsJakub Konka
Boundary symbols have a special name prefix: * section$start$segname$sectname * section$stop$segname$sectname * segment$start$segname * segment$stop$segname and will resolve to either start or end of the respective section/segment if found. If not found, we return an error stating we couldn't find the requested section/segment rather than silently failing and resolving the address to 0 which seems to be the case with Apple's ld64.
2023-11-08MachO: support `-fsingle-threaded` modeJacob Young
2023-11-04elf: redo strings management in the linkerJakub Konka
* atom names - are stored locally and pulled from defining object's strtab * local symbols - same * global symbols - in principle, we could store them locally, but for better debugging experience - when things go wrong - we store the offsets in a global strtab used by the symbol resolver
2023-10-31std.builtin.Endian: make the tags lower caseAndrew Kelley
Let's take this breaking change opportunity to fix the style of this enum.
2023-10-31mem: fix ub in writeIntJacob Young
Use inline to vastly simplify the exposed API. This allows a comptime-known endian parameter to be propogated, making extra functions for a specific endianness completely unnecessary.
2023-10-30macho: implement enough of extern handling to pass comptime export testsJakub Konka
2023-10-10revert compiler_rt: no need to put it in a static libraryAndrew Kelley
This mostly reverts 6e0904504155d3cba80955c108116170fd739aec however it leaves intact the linker supporting both obj and lib files, and the frontend choosing which one to create.
2023-10-10compiler_rt: no need to put it in a static libraryAndrew Kelley
It's simpler to link against compiler_rt.o directly.
2023-09-26kubkon review changes: 4Michael Dusan
- fix `darwin_sdk_layout.?` with null checks
2023-09-25kubkon review changes: 3Michael Dusan
- make vendored settings failure unreachable - rename field `darwinSdkLayout` → `darwin_sdk_layout` - make `darwin_sdk_layout` optional
2023-09-25kubkon review changes: 2Michael Dusan
- drop --verbose-link printing until ready to put in driver frontend
2023-09-25kubkon review changes: 1Michael Dusan
general: - rename `DarwinSdkLayout` → `DarwinSdkLayout` - drop `DarwinSdkLayout.installation` (not needed for darwin) - document struct inferSdkVersion: - use explicit allocator - avoid trying to infer SDK ver from vendored path
2023-09-25macos: better SDK version detectionMichael Dusan
SDK version detection: - read SDKSettings.json before inferral from SDK path - vendored libc: add SDKSettings.json for SDK version info resolveLibSystem: - adjust search order to { search_dirs, { sysroot or vendored }} - previous search order was { sysroot, search_dirs, vendored }