aboutsummaryrefslogtreecommitdiff
path: root/src/link/Coff/Relocation.zig
AgeCommit message (Collapse)Author
2024-10-24link/Coff: simplify file structure by collapsing all files into Coff.zig ↵Jakub Konka
(#21761) * coff: collapse Coff/lld.zig logic into Coff.zig * coff: rename std.coff uses to coff_util * coff: rename self to coff for *Coff references * coff: collapse Coff/Atom.zig logic into Coff.zig * coff: collapse Coff/Relocation.zig logic into Coff.zig * coff: collapse Coff/ImportTable.zig logic into Coff.zig * coff: remove unused Coff/Object.zig * link/Coff: fix rebase gone wrong
2024-01-01linker: update target referencesAndrew Kelley
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-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-04-26coff: invalidate GOT relocs after segment shift in memoryJakub Konka
2023-04-21coff: treat vmaddr of 0 as unallocated when checking if resolvableJakub Konka
2023-04-21coff: use TableSection for GOTJakub Konka
2023-03-30coff: due to ASLR we need to dupe the code for relocatingJakub Konka
In addition, we need to be careful not to mark the relocations as resolved prematurely as then we are risking malforming the binary as we need to resolve the relocs twice: once for in-memory writes, and once for in-file updates.
2023-03-30coff: use std.os.windows wrappers; fix relocating in-fileJakub Konka
2023-03-30coff: make sure we correctly slide relocation target when resolvingJakub Konka
2023-03-28coff: put section growing in helper; only mark section if actually resolvedJakub Konka
2023-03-28coff: use ArrayHashMap if we are iterating over keysJakub Konka
2023-03-28coff: resolve relocs on bytes buffer directlyJakub Konka
2023-03-28coff: move import table definition into a separate ImportTable.zig moduleJakub Konka
2023-03-28coff: do not use atoms for synthetic import address tableJakub Konka
Instead, introduce a custom ImportTable structure which will act as a thunk in the MachO linker, and we will use that to calculate the address of a pointer on-the-fly. Additionally, fix logic in writeImportTables to allow for multiple DLLs.
2023-01-31link: make Coff atoms fully owned by the linkerJakub Konka
2022-11-18run zig fmt on everything checked by CIStevie Hryciw
2022-11-06coff: move relocation in its own moduleJakub Konka