diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-08-17 18:42:39 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-08-19 03:41:13 -0700 |
| commit | c0b7f20893ea5ca42e0d02b59db6f459c2f80ca1 (patch) | |
| tree | 6fea31632a6d8803b0689081b7f16e74cf0660ff /src/link/Elf.zig | |
| parent | 2ccaa5414b904edb2f4af293291f5401d106f277 (diff) | |
| download | zig-c0b7f20893ea5ca42e0d02b59db6f459c2f80ca1.tar.gz zig-c0b7f20893ea5ca42e0d02b59db6f459c2f80ca1.zip | |
stage2: implement stack protectors
This is one of the final remaining TODOs for the LLVM backend.
Diffstat (limited to 'src/link/Elf.zig')
| -rw-r--r-- | src/link/Elf.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/link/Elf.zig b/src/link/Elf.zig index 2f67c35205..9902886bac 100644 --- a/src/link/Elf.zig +++ b/src/link/Elf.zig @@ -1673,6 +1673,12 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v } } + // stack-protector. + // Related: https://github.com/ziglang/zig/issues/7265 + if (comp.libssp_static_lib) |ssp| { + try argv.append(ssp.full_object_path); + } + // compiler-rt if (compiler_rt_path) |p| { try argv.append(p); |
