aboutsummaryrefslogtreecommitdiff
path: root/src/link/Coff.zig
AgeCommit message (Collapse)Author
2023-03-30coff: use copy in zig-cache for child process in HCSJakub Konka
Ideally, we would just do an atomic rename, but so far I had no luck. I have also tried marking the file to delete-on-close but then we cannot use it to spawn the process. So for now, let's just put a copy in `zig-cache` and let the user decide when to recycle the cache dir.
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: assert the imports table is not dirtyJakub 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-03-28coff: repurpose value field of import Symbol for lib_name offsetJakub Konka
2023-03-28link: pass expected lib name as hint in getGlobalSymbol()Jakub Konka
2023-03-28coff: grow .idata if requiredJakub Konka
2023-03-03codegen: move gen logic for typed values, consts and decl ref to common codegenJakub Konka
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2023-02-01link: fix pointer invalidation issues in Elf, MachO and CoffJakub Konka
2023-02-01link: decouple DI atoms from linker atoms, and manage them in Dwarf linkerJakub Konka
2023-01-31link: make Coff atoms fully owned by the linkerJakub Konka
2023-01-26coff: migrate to new non-allocateDeclIndexes APIJakub Konka
2023-01-25self-hosted: rename codegen Result.appended to Result.okJakub Konka
2023-01-25self-hosted: remove unused `externally_managed` prong for Decls codeJakub Konka
2022-12-28link: fix memory leaksJacob Young
* Fix linker memory leaks found while running `zig build test-cases`. * Add missing target to test manifest.
2022-12-27update uses of overflow arithmetic builtinsVeikka Tuominen
2022-12-06remove `-fstage1` optionAndrew Kelley
After this commit, the self-hosted compiler does not offer the option to use stage1 as a backend anymore.
2022-11-29std.mem.Allocator: allow shrink to failAndrew Kelley
closes #13535
2022-11-18run zig fmt on everything checked by CIStevie Hryciw
2022-11-06coff: move relocation in its own moduleJakub Konka
2022-11-05coff: use .x86 instead of .i386Jakub Konka
2022-11-05coff: tentatively handle Obj in getImageBase() funcJakub Konka
2022-11-05coff: circumvent stage1 inference problemsJakub Konka
2022-11-05coff: compile and link simple exit program on arm64Jakub Konka
* make image base target dependent * fix relocs to imports
2022-11-05coff: implement handling of arm64-specific relocsJakub Konka
2022-11-05coff: clean up relocation handling between x86 and arm64Jakub Konka
2022-11-05coff: generate relocations for branch, GOT, direct refsJakub Konka
2022-11-04all: rename i386 to x86Ali Chraghi
2022-10-24link: add an explicit error set for flush() and flushModule()Andrew Kelley
This makes it easier to understand how control flow should happen in various cases; already just by doing this it is revealed that UndefinedSymbol and UndefinedSymbolReference should be merged, and that MissingMainEntrypoint should be removed in favor of the ErrorFlags mechanism thath we already have for missing the main entrypoint. The main motivation for this change, however, is preventing a compile error when there is conditional compilation inside linker implementations, causing the flush() error set to depend on compilation options. With this change, the error set is fixed, and, notably, the `-Donly-c` flag no longer has compilation errors due to this error set.
2022-10-18all: rename `@maximum` to `@max` and `@minimum` to `@min`Ali Chraghi
2022-09-18macho: add logic for expanding segments in memoryJakub Konka
2022-09-18macho: move to incremental writes and global relocs for incrementalJakub Konka
2022-09-10x86_64: combine got_load, direct_load and imports_load into linker_load MCVJakub Konka
2022-09-09macho+coff: return index into global table from getGlobalSymbolJakub Konka
2022-09-09coff: use global accessor abstractions from MachOJakub Konka
2022-09-07coff: fix tracking of got and import entries; free relocs in update* fnsJakub Konka
2022-09-07coff: track globals in contiguous array to allow for tombstonesJakub Konka
2022-09-07coff: fix memory leak in incorrectly disposing of globals tableJakub Konka
2022-09-07coff: use more generous initial memory sizes for sectionsJakub Konka
2022-09-07coff: remove redundant bits and clean upJakub Konka
2022-09-07coff: grow section in virtual address space when requiredJakub Konka
2022-09-07coff: find new file space for a section (file offsets)Jakub Konka
2022-09-07coff: differentiate between file space and VM space for allocJakub Konka
2022-09-07coff: create a helper for allocating sectionsJakub Konka
2022-09-07coff: fix writing strtab to PE image fileJakub Konka
2022-09-07coff: mark relocations dirty when target atoms changeJakub Konka