aboutsummaryrefslogtreecommitdiff
path: root/src/link/MachO/ZldAtom.zig
AgeCommit message (Collapse)Author
2023-08-29macho: unify Atom concept between driversJakub Konka
2023-08-29macho: unify concept of SymbolWithLoc across driversJakub Konka
2023-08-02macho: track unwind/dwarf cfi records by symbol rather than atomJakub Konka
This solves the nuance case of compiling hand-crafted assembly files which do not feature `MH_SUBSECTIONS_VIA_SYMBOLS` flag resulting in input `Atom`s encompassing multiple symbols each with unique unwind information.
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
2023-06-21macho: do not skip scanning relocs if the sym is non-externJakub Konka
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-04-21macho: do not allocate atoms for stub entriesJakub Konka
2023-04-01macho: handle weird case of entrypoint being a stubJakub Konka
2023-03-23macho+zld: only check for alias symbols for non-extern relocationsJakub Konka
2023-03-22macho+zld: refactor parsing of relocation targetJakub Konka
2023-03-21macho+zld: when finding by address, note the end of section symbols tooJakub Konka
Previously, if we were looking for the very last symbol by address in some section, and the next symbol happened to also have the same address value but would reside in a different section, we would keep going finding the wrong symbol in the wrong section. This mechanism turns out vital for correct linking of Go binaries where the runtime looks for specially crafted synthetic symbols which mark the beginning and end of each section. In this case, we had an unfortunate clash between the end of PC marked machine code section (`_runtime.etext`) and beginning of read-only data (`_runtime.rodata`).
2023-02-06macho: downgrade alignment requirements for symtab in object filesJakub Konka
Parse and sort relocations by address descending.
2023-01-20zld: parse, synthesise and emit unwind recordsJakub Konka
2022-11-18run zig fmt on everything checked by CIStevie Hryciw
2022-10-30macho: fix regression in dead strip for x86_64Jakub Konka
Correctly handle calculating encompassing atoms for local relocations (`r_extern == 0`).
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: 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: 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: fix 32bit buildJakub Konka
2022-10-22macho: upstream rewritten traditional linker, zldJakub Konka
kubkon/zld gitrev 5733ed87abe2f07e1330c3232a252e9defec638a