aboutsummaryrefslogtreecommitdiff
path: root/src/link/MachO/Zld.zig
AgeCommit message (Collapse)Author
2021-07-18zld: move contents of Zld into MachO moduleJakub Konka
2021-07-18zld: migrate symbol mgmt to incremental backendJakub Konka
2021-07-17zld: allocate empty TextBlock for synthetic ___dso_handleJakub Konka
2021-07-17zld: more fixes todo with symbol resolutionJakub Konka
namely, fixes proper symbol reolution when scanning and including objects from static archives, and properly discard any null symbols when a tentative definition was substituted by a defined, global symbol.
2021-07-17zld: fix incorrect global symbol collision checkJakub Konka
2021-07-17zld: demote logging back to debug from warnJakub Konka
2021-07-17zld: fix committing stub info into final binaryJakub Konka
2021-07-17zld: fixup flush functionJakub Konka
2021-07-17zld: allocate TextBlocks and symbolsJakub Konka
2021-07-17zld: correctly set n_sect for sections as symbolsJakub Konka
2021-07-17zld: simplify and move Relocations into TextBlockJakub Konka
It makes sense to have them as a dependent type since they only ever deal with TextBlocks. Simplify Relocations to rely on symbol indices and symbol resolver rather than pointers.
2021-07-16zld: replace parsed reloc with a simple wrapper around macho.relocation_infoJakub Konka
2021-07-16zld: draft symbol resolver on macho.nlist_64 onlyJakub Konka
2021-07-15zld: move TextBlock into standalone fileJakub Konka
which should make managing the logic of parsing and resolving relocs that much simpler to parse.
2021-07-15zld: thin out Relocation by not storing *TextBlockJakub Konka
this way we shave off 8 bytes per Relocation structure, and instead we can pass the *TextBlock as args to resolve function.
2021-07-15zld: reuse string table for symbol namesJakub Konka
rather than manage allocs separately per symbol.
2021-07-15zld: move tracking binding for proxies into TextBlockJakub Konka
which is the source of binding rather than its target. That is, we now track by source.
2021-07-15zld: remove StringTable abstractionJakub Konka
2021-07-15zld: add temp basic handling of debugging stabsJakub Konka
2021-07-15zld: fix incorrectly worked out section sizeJakub Konka
Also, add a solution to a degenerate case where on x86_64 a relocation refers to a cell in a section via section start address even though a symbol exists. In such case, make the section spawned symbol an alias of the actual symbol.
2021-07-15zld: add DICE support mainly for x86_64-macosJakub Konka
2021-07-15zld: add basic Signed reloc resolutionJakub Konka
and fix handling Unsigned for x86_64.
2021-07-15zld: ___dso_handle is regular at 0x100000000Jakub Konka
which points at the start of the __TEXT segment. Also, ensure C++ initializers and terminators are rebased.
2021-07-15zld: correctly estimate TextBlock's alignment withJakub Konka
section's alignment serving as the maximum alignment that can be seen in this particular section. However, TextBlocks are still allowed to have at most that alignment.
2021-07-15zld: populate sections from the top rather than from bottomJakub Konka
2021-07-15zld: re-enable logging of TextBlocksJakub Konka
2021-07-15zld: fix allocating tentative defsJakub Konka
2021-07-15zld: turn logging offJakub Konka
2021-07-15zld: fix resolving TLV offset relocationsJakub Konka
2021-07-15zld: TextBlock needs to be written to an aligend offset tooJakub Konka
2021-07-15zld: dedup symbols in the symbol tableJakub Konka
2021-07-15zld: re-enable all of linker after complete rewriteJakub Konka
2021-07-15zld: fix alloc alignment and resolve relocsJakub Konka
2021-07-15zld: track symbols defined within TextBlockJakub Konka
in case TextBlock represents an entire section with symbols defined within.
2021-07-15zld: allocate TextBlocksJakub Konka
temporarily by iterating over all defined TextBlocks. However, once we merge this with MachO incremental, updates will be done at the point of creation and/or update. Also, fix mining TLV knowledge for working out TLV pointers.
2021-07-15zld: save rebase and TLV offset as part of TextBlockJakub Konka
instead of as part of the Symbol. This seems to be more optimal way of handling dyld ops in presence of no splittable input sections in object files.
2021-07-15zld: keep text blocks per segment,section pairJakub Konka
2021-07-15zld: update relocs and start prepping for segment allocsJakub Konka
2021-07-15zld: dealloc TextBlock if omittedJakub Konka
2021-07-15zld: move should_rebase logic into SymbolJakub Konka
2021-07-15zld: simplify relocation parsingJakub Konka
2021-07-15zld: parse relocs per generated TextBlockJakub Konka
2021-07-15zld: create TextBlocks for tentative definitionsJakub Konka
and fix the links in the `TextBlock`s linked list!
2021-07-15zld: refactor section into TextBlocks conversionJakub Konka
2021-07-15zld: convert section in linked list of TextBlocksJakub Konka
2021-07-15 zld: draft up final format of TextBlockJakub Konka
2021-07-15zld: put relocs in a TextBlockJakub Konka
2021-07-15zld: draft out splitting sections into blocksJakub Konka
2021-07-15zld: reenable entire linker in the new schemeJakub Konka
without the stabs... They are tricky and need a bit more work.
2021-07-15zld: allocate symbols using the new schemeJakub Konka