| Age | Commit message (Collapse) | Author | |
|---|---|---|---|
| 2022-09-10 | x86_64: combine got_load, direct_load and imports_load into linker_load MCV | Jakub Konka | |
| 2022-09-09 | macho+coff: return index into global table from getGlobalSymbol | Jakub Konka | |
| 2022-09-09 | coff: use global accessor abstractions from MachO | Jakub Konka | |
| 2022-09-07 | coff: fix tracking of got and import entries; free relocs in update* fns | Jakub Konka | |
| 2022-09-07 | coff: track globals in contiguous array to allow for tombstones | Jakub Konka | |
| 2022-09-07 | coff: fix memory leak in incorrectly disposing of globals table | Jakub Konka | |
| 2022-09-07 | coff: use more generous initial memory sizes for sections | Jakub Konka | |
| 2022-09-07 | coff: remove redundant bits and clean up | Jakub Konka | |
| 2022-09-07 | coff: grow section in virtual address space when required | Jakub Konka | |
| 2022-09-07 | coff: find new file space for a section (file offsets) | Jakub Konka | |
| 2022-09-07 | coff: differentiate between file space and VM space for alloc | Jakub Konka | |
| 2022-09-07 | coff: create a helper for allocating sections | Jakub Konka | |
| 2022-09-07 | coff: fix writing strtab to PE image file | Jakub Konka | |
| 2022-09-07 | coff: mark relocations dirty when target atoms change | Jakub Konka | |
| 2022-09-07 | coff: fix bug in lowerUnnamedConst | Jakub Konka | |
| 2022-09-07 | coff: fix runtime traps | Jakub Konka | |
| 2022-09-07 | coff: implement lowering unnamed consts | Jakub Konka | |
| 2022-09-07 | coff: fix contents of IAT, and ensure codegen loads addr into reg | Jakub Konka | |
| As far as I can see, unlike with MachO, we don't have any stubs helper routines available and need to load a bound pointer into a register to then call it. | |||
| 2022-09-07 | coff: populate import address table dir | Jakub Konka | |
| 2022-09-07 | coff: create import atoms and matching bindings | Jakub Konka | |
| 2022-09-07 | coff: re-enable default entrypoint for Windows | Jakub Konka | |
| 2022-08-31 | coff: write base relocations for the dynamic linker | Jakub Konka | |
| This means we can request ASLR on by default as other COFF linkers do. Currently, we write the base relocations in bulk, however, given that there is a mechanism for padding in place in PE/COFF I believe there might be room for making it an incremental operation (write base relocation whenever we add/update a pointer that would require it). | |||
| 2022-08-30 | coff: cleanup relocations; remove COFF support from other backends | Jakub Konka | |
| Given that COFF will want to support PIC from ground-up, there is no point in leaving outdated code for COFF in other backends such as arm or aarch64. Instead, when we are ready to look into those, we can start figuring out what to add and where. | |||
| 2022-08-30 | coff: add basic handling of GOT PC relative indirection | Jakub Konka | |
| 2022-08-30 | coff: fallback to _start as default entry point for now | Jakub Konka | |
| This is not technically correct, but given that we are not yet able to link against the CRT, it's a good default until then. Add basic logging of generated symbol table in the linker. | |||
| 2022-08-30 | coff: ...and lift-off! | Jakub Konka | |
| 2022-08-30 | coff: add missing bits required for minimal PE example | Jakub Konka | |
| 2022-08-30 | coff: allocate and write atoms to file | Jakub Konka | |
| 2022-08-30 | coff: populate missing section metadata | Jakub Konka | |
| 2022-08-30 | coff: add helpers for setting section/symbol names | Jakub Konka | |
| 2022-08-30 | coff: allow for strtab in final PE image | Jakub Konka | |
| I believe this is going to be vital for section headers having names that require the use of a string table. | |||
| 2022-08-30 | coff: initial implementation of incremental file allocs | Jakub Konka | |
| 2022-08-30 | coff: always write all data directory headers to file | Jakub Konka | |
| Maximum number is always 16, and this also unbreaks `dumpbin.exe` run on a simple section-less PE image created with our linker. | |||
| 2022-08-30 | coff: write data directory and section headers to file | Jakub Konka | |
| 2022-08-30 | coff: set some defaults for PE headers | Jakub Konka | |
| 2022-08-30 | coff: write headers to file | Jakub Konka | |
| 2022-08-30 | coff: reorganize the linker | Jakub Konka | |
| 2022-08-30 | coff: fix after rebase | Jakub Konka | |
| 2022-08-30 | coff: move header writing logic into flush | Jakub Konka | |
| 2022-08-29 | link: add force_undefined_symbols to cache hash | Andrew Kelley | |
| Follow-up for d5233ee85ce13cba3dd03e4c0c938cee193b9b19. | |||
| 2022-08-25 | add ability to pass force undefined symbols to the linker | Jakub Konka | |
| This commit enables `-u <symbol>` for ELF and `-include:<symbol>` for COFF linkers for use internally. This means we do not expose these flags to the users just yet, however, we make use of them internally whenever required. One such use case is forcing inclusion of `_tls_index` when linking for Windows with mingw and LTO and dead code stripping enabled. This ensures we add `_tls_index` to the symbol resolver as an undefined symbol and force the linker to include an atom that provides it marking it a dead-code-stripping root - meaning it will not be garbage collected by the linker no matter what. | |||
| 2022-08-23 | coff: improve default COFF/PE object parser | Jakub Konka | |
| We now do not allocate memory for headers and other metadata unless requested by the caller. Instead, we read-in the entire contents of the image into memory and operate on pointers and casts wherever possible. I have a left a TODO to hook up Windows' memory-mapped API here in-place of standard `readToEndAlloc` which should be more memory proof on memory constrained hosts. This commit also supplements our `std.coff` with a lot missing basic extern structs required to make our COFF linker. | |||
| 2022-08-19 | make self-hosted the default compiler | Andrew Kelley | |
| stage1 is available behind the -fstage1 flag. closes #89 | |||
| 2022-08-18 | std.Target gains ObjectFormat field | Andrew Kelley | |
| 2022-07-04 | link.Coff: notice special windows symbols | Andrew Kelley | |
| in order to have a better default for subsystem. This brings stage2 behavior on par with stage1. | |||
| 2022-06-27 | macho: implement -dead_strip_dylibs linker flag | Jakub Konka | |
| 2022-06-25 | macho: implement -headerpad_max_install_names | Jakub Konka | |
| 2022-06-25 | cache setting macho search strategy flags | Jakub Konka | |
| 2022-06-20 | [MachO] add -pagezero_size | Motiejus Jakštys | |
| Pass `-pagezero_size` to the MachO linker. This is the final "unsupported linker arg" that I could chase that CGo uses. After this and #11874 we may be able to fail on an "unsupported linker arg" instead of emiting a warning. Test case: zig=/code/zig/build/zig CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 CC="$zig cc -target x86_64-macos" CXX="$zig c++ -target x86_64-macos" go build -a -ldflags "-s -w" cgo.go I compiled a trivial CGo program and executed it on an amd64 Darwin host. To be honest, I am not entirely sure what this is doing. This feels right after reading what this argument does in LLVM sources, but I am by no means qualified to make MachO pull requests. Will take feedback. | |||
| 2022-06-17 | compiler_rt: use single cache for libcompiler_rt.a static lib | Jakub Konka | |
