aboutsummaryrefslogtreecommitdiff
path: root/src/link
AgeCommit message (Collapse)Author
2024-07-30elf: move ownership of input merge sections to ObjectJakub Konka
2024-07-30std.Target: Remove `sparcel` architecture tag.Alex Rønne Petersen
What is `sparcel`, you might ask? Good question! If you take a peek in the SPARC v8 manual, §2.2, it is quite explicit that SPARC v8 is a big-endian architecture. No little-endian or mixed-endian support to be found here. On the other hand, the SPARC v9 manual, in §3.2.1.2, states that it has support for mixed-endian operation, with big-endian mode being the default. Ok, so `sparcel` must just be referring to SPARC v9 running in little-endian mode, surely? Nope: * https://github.com/llvm/llvm-project/blob/40b4fd7a3e81d32b29364a1b15337bcf817659c0/llvm/lib/Target/Sparc/SparcTargetMachine.cpp#L226 * https://github.com/llvm/llvm-project/blob/40b4fd7a3e81d32b29364a1b15337bcf817659c0/llvm/lib/Target/Sparc/SparcTargetMachine.cpp#L104 So, `sparcel` in LLVM is referring to some sort of fantastical little-endian SPARC v8 architecture. I've scoured the internet and I can find absolutely no evidence that such a thing exists or has ever existed. In fact, I can find no evidence that a little-endian implementation of SPARC v9 ever existed, either. Or any SPARC version, actually! The support was added here: https://reviews.llvm.org/D8741 Notably, there is no mention whatsoever of what CPU this might be referring to, and no justification given for the "but some are little" comment added in the patch. My best guess is that this might have been some private exercise in creating a little-endian version of SPARC that never saw the light of day. Given that SPARC v8 explicitly doesn't support little-endian operation (let alone little-endian instruction encoding!), and no CPU is known to be implemented as such, I think it's very reasonable for us to just remove this support.
2024-07-29link.Elf: Define __global_pointer$ for riscv32 too.Alex Rønne Petersen
See: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc
2024-07-28link.Coff: Basic support for `/Brepro` in the self-hosted linker.Alex Rønne Petersen
Just keep things simple and zero the timestamp. It's not obvious that there's any real benefit to adding complexity and harming performance by computing a hash of the whole file for the timestamp value. See: * https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#general-concepts * https://learn.microsoft.com/en-us/windows/win32/debug/pe-format#debug-type In the future, we should at least add an empty `IMAGE_DEBUG_TYPE_REPRO` entry to the debug data directory for this case, but I didn't want to do too much surgery right now since it's early days for COFF support in the self-hosted linker.
2024-07-28link: Accept `-Brepro` linker option and pass it to LLD.Alex Rønne Petersen
Enable it by default when building Zig code in release modes. Contributes to #9432.
2024-07-28Merge pull request #20807 from Rexicon226/riscvJakub Konka
riscv: more backend progress
2024-07-27macho: fix typo in boundary symbol tag: $stop -> $endJakub Konka
2024-07-26riscv: clean up and unify encoding logicDavid Rubin
2024-07-25add --debug-rt CLI arg to the compiler + bonus editsAndrew Kelley
The flag makes compiler_rt and libfuzzer be in debug mode. Also: * fuzzer: override debug logs and disable debug logs for frequently called functions * std.Build.Fuzz: fix bug of rerunning the old unit test binary * report errors from rebuilding the unit tests better * link.Elf: additionally add tsan lib and fuzzer lib to the hash
2024-07-23default "trace pc guard" coverage offAndrew Kelley
* Add -f(no-)sanitize-coverage-trace-pc-guard CLI flag which defaults to off. This value lowers to TracePCGuard = true (LLVM backend) and -Xclang -fsanitize-coverage-trace-pc-guard. These settings are not automatically included with -ffuzz. * Add `Build.Step.Compile` flag for sanitize_coverage_trace_pc_guard with appropriate documentation. * Add `zig cc` integration for the respective flags. * Avoid crashing in ELF linker code when -ffuzz -femit-llvm-ir used together.
2024-07-23Merge pull request #20751 from Rexicon226/riscv-eflagsJakub Konka
elf: add riscv eflag collisions
2024-07-23Merge pull request #20725 from ziglang/fuzzAndrew Kelley
initial support for integrated fuzzing
2024-07-23macho: use pread syscall when loading tapi fileJakub Konka
This avoids mixing preads with reads which do not mix well especially on Windows.
2024-07-22elf: add riscv eflag collisionsDavid Rubin
2024-07-22fix macho linker integration with libfuzzerAndrew Kelley
2024-07-22add libfuzzer to linkingAndrew Kelley
2024-07-22macho: fix 32bit compilation issuesJakub Konka
2024-07-22macho: handle empty string in ZigObject.getStringJakub Konka
2024-07-22macho: write sections in parallel in -r modeJakub Konka
2024-07-22macho: calc section sizes in parallel in -r modeJakub Konka
2024-07-22macho: cache string lenJakub Konka
2024-07-22add more tracy hooksJakub Konka
2024-07-22macho: run more things in parallelJakub Konka
2024-07-22macho: remove stale codeJakub Konka
2024-07-22macho: parse input files in parallelJakub Konka
2024-07-22macho: redo input file parsing in prep for multithreadingJakub Konka
2024-07-20Fix typos in code comments in `src/`sobolevn
2024-07-20dev: add missing x86_64 backend checksJacob Young
2024-07-20dev: fix llvm backend checksJacob Young
2024-07-19dev: introduce dev environments that enable compiler feature setsJacob Young
2024-07-19move non-libc stuff out of std.cAndrew Kelley
2024-07-18macho: fix emitting data-in-code entriesJakub Konka
2024-07-18macho: reinstate duplicate definition checkingJakub Konka
2024-07-18macho: fix off-by-one when populating strtabJakub Konka
2024-07-18macho: fix 32bit compilation issuesJakub Konka
2024-07-18macho: use isec for working out getAtomData in ZigObjectJakub Konka
2024-07-18macho: extract testing logic for TLS into a helperJakub Konka
2024-07-18macho: clean up atom+symbol creation logic in ZigObjectJakub Konka
2024-07-18macho: ensure we always name decls like LLVM to avoid confusionJakub Konka
2024-07-18macho: fix unresolved symbols error reportingJakub Konka
2024-07-18macho: do not randomly append non-incr atoms in ZigObjectJakub Konka
2024-07-18macho: update non-incremental section sizes for ZigObject sectionsJakub Konka
2024-07-18macho: re-enable writing out static archive with ZigObjectJakub Konka
2024-07-18macho: skip resizing incremental Zig sections in r modeJakub Konka
2024-07-18macho: write non-incremental atoms in ZigObjectJakub Konka
2024-07-18macho: pretty print relocation types in logs and errorsJakub Konka
2024-07-18macho: emit relocs for non-zig-sections in ZigObjectJakub Konka
2024-07-18macho: bring back relocatable mode for ZigObjectJakub Konka
2024-07-18macho: re-enable calculating num of relocs for ZigObjectJakub Konka
2024-07-18macho: adjust global creation in ZigObject to new modelJakub Konka