aboutsummaryrefslogtreecommitdiff
path: root/src/link/MachO
AgeCommit message (Collapse)Author
2022-10-22macho: some docsJakub Konka
2022-10-22macho: refactor dead code stripping conditionsJakub Konka
1. If an object file was not compiled with `MH_SUBSECTIONS_VIA_SYMBOLS` such a hand-written ASM on x86_64, treat the entire object file as not suitable for dead code stripping aka a GC root. 2. If there are non-extern relocs within a section, treat the entire section as a root, at least temporarily until we work out the exact conditions for marking the atoms live.
2022-10-22macho: do not skip over SUBTRACTOR reloc when dead strippingJakub Konka
2022-10-22macho: fix incorrect lookup of symbols when calculating subtractorsJakub Konka
2022-10-22macho: rewrite movq to leaq when TLV is not external pointerJakub Konka
2022-10-22macho: gracefully handle uninitialized symtabs in objectsJakub Konka
2022-10-22macho: fix handling of lack of subsections and tracking of inner symbolsJakub Konka
2022-10-22macho: relax SUBTRACTOR assumption it not being a defined globalJakub Konka
2022-10-22macho: revert changes to file descriptors mgmtJakub Konka
2022-10-22macho: fix silly error where we would incorrectly skip a valid bindingJakub Konka
2022-10-22macho: fix bug in incorrectly splicing nodes in trieJakub Konka
2022-10-22macho: do not assume __la_symbol_ptr was createdJakub Konka
2022-10-22macho: always create __TEXT segmentJakub Konka
2022-10-22macho: skip parsing __eh_frame until we know how to handle itJakub Konka
2022-10-22macho: fix 32bit buildJakub Konka
2022-10-22macho: remove unused nlist flagsJakub Konka
2022-10-22macho: upstream rewritten traditional linker, zldJakub Konka
kubkon/zld gitrev 5733ed87abe2f07e1330c3232a252e9defec638a
2022-10-18all: rename `@maximum` to `@max` and `@minimum` to `@min`Ali Chraghi
2022-09-18macho: fix after sync with masterJakub Konka
2022-09-18macho: ensure we extend section size when updating last atomJakub Konka
2022-09-18macho: allow for add and ldr when resolving GOT_LOAD_* relocsJakub Konka
2022-09-18macho: rewrite how we allocate space in incremental contextJakub Konka
2022-09-18macho: start separating linking contextsJakub Konka
2022-09-18macho: move to incremental writes and global relocs for incrementalJakub Konka
2022-09-18macho: do not call populateMissingMetadata in full link modeJakub Konka
2022-09-18macho: clean up use of section idsJakub Konka
2022-09-18macho: move main driver loop for one-shot into standalone zld moduleJakub Konka
2022-09-18macho: separate in structure and logic incremental relocs and file relocsJakub Konka
2022-09-17macho: do not assume every object has a symtabJakub Konka
For example, building stage2 requires an empty `empty.cc` source file compiling which generates a valid translation unit with no symtab/strtab. In this case, we cannot simply assume that every translation unit will have a valid symtab; instead, we cautiously default the input symtab and strtab fields to optional `null` to signal symtab's presence or its lack of. In case the symtab is not present, we catch this fact when splitting input sections into subsections and create a synthetic symbol per every suitable section.
2022-09-09macho: use globals free list like in COFF linkerJakub Konka
2022-09-07macho+wasm: unify and clean up closing file handlesJakub Konka
2022-08-30coff: reorganize the linkerJakub Konka
2022-08-24Merge pull request #12574 from Vexu/remove-bit-op-type-paramAndrew Kelley
stage2+stage1: remove type parameter from bit builtins
2022-08-23macho: fix compile errors in std.debugJakub Konka
2022-08-23std.debug: implement support for DWARFv5Andrew Kelley
2022-08-22Dwarf: Added stroffsetsptr support (#12270)Keith Chambers
* Added support for stroffsetsptr class in Dwarf stdlib * Proper initializion of debug_str_offsets in DwarfInfo * Added missing null initializer to DwarfInfo in Macho * Added missing is_64 field to getAttrString in DwarfInfo * Fixed formatting * Added missing is_64 param to getAttrString * Added required cast to usize * Adding missing .debug_str_offsets initialization * getAttrString now uses the str_offsets_base attr
2022-08-22stage2+stage1: remove type parameter from bit builtinsVeikka Tuominen
Closes #12529 Closes #12511 Closes #6835
2022-08-12macho: update __DWARF sections before and after writing out __LINKEDITJakub Konka
2022-08-10link.MachO: use accurate alignment attribute on pointersAndrew Kelley
Also adds a new method to ArrayList: appendUnalignedSlice
2022-08-10Revert "macho: allow unaligned offsets in object files"Andrew Kelley
This reverts commit 45c444ff18b43d30a7277e346174ba6eca4a6193.
2022-08-10macho: allow unaligned offsets in object filesJakub Konka
2022-08-03macho: do not preempt segment headers; do it when commiting to fileJakub Konka
This way, tracking segment-to-section mapping becomes a lot easier since it's effectively just start index plus number of sections defined within the segment. If a section becomes empty however care needs to be taken to remove the header upon committing to the final binary.
2022-08-03macho: fix linking in incremental contextJakub Konka
Fix incorrect writing of symtab and strtab in dSYM bundle in incremental context. Fix incorrectly navigating unnamed consts (freeing) in incremental context. This is currently hard-coded to require all consts to land in `__TEXT,__const`, which is wrong and needs a rewrite.
2022-08-03macho: cleanup output section selection logicJakub Konka
Cache only section indexes used by the linker for synthetic sections and/or incremental codepath.
2022-08-03macho: update how we insert output sectionsJakub Konka
Instead of generating sections upfront, allow generation by scanning the object files for input -> output sections mapping. Next, always strive to keep output sections in the final container sorted as they appear in the final binary. This makes the linker less messy wrt handling of output sections sort order for dyld/macOS not to complain. There's still more work to be done for incremental context though to make this work but looks promising already.
2022-08-03macho: sync with zldJakub Konka
gitrev a2c32e972f8c5adfcda8ed2d99379ae868f59c24 https://github.com/kubkon/zld/commit/a2c32e972f8c5adfcda8ed2d99379ae868f59c24
2022-07-27std.fmt: add more invalid format string errorsr00ster91
2022-07-26std.fmt: require specifier for unwrapping ?T and E!TInKryption
2022-07-25macho: fix memory leak and refactor Target usageJakub Konka
2022-07-22macho: include __StaticInit input sections as GC rootsJakub Konka