diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-04-07 07:51:39 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-04-07 07:54:47 -0700 |
| commit | b086b7da9e9adbb4445363f635d3bb37177b2f18 (patch) | |
| tree | e288dc1b7191c94b74a2f300524bfbd1d7459d37 /src/link.zig | |
| parent | 1fdea551b22726783356c5bed90bce63706b550f (diff) | |
| download | zig-b086b7da9e9adbb4445363f635d3bb37177b2f18.tar.gz zig-b086b7da9e9adbb4445363f635d3bb37177b2f18.zip | |
zig cc: complete the -wrap flag implementation
* use a set instead of a list
* use of this flag currently requires LLD
* add documentation
* make it only a zig cc compatibility flag for now because I personally
think this is an anti-feature.
Diffstat (limited to 'src/link.zig')
| -rw-r--r-- | src/link.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/link.zig b/src/link.zig index fb0f79f5f2..18002f64a6 100644 --- a/src/link.zig +++ b/src/link.zig @@ -183,12 +183,18 @@ pub const Options = struct { wasi_emulated_libs: []const wasi_libc.CRTFile, lib_dirs: []const []const u8, rpath_list: []const []const u8, - wrap_list: []const []const u8, /// List of symbols forced as undefined in the symbol table /// thus forcing their resolution by the linker. /// Corresponds to `-u <symbol>` for ELF/MachO and `/include:<symbol>` for COFF/PE. force_undefined_symbols: std.StringArrayHashMapUnmanaged(void), + /// Use a wrapper function for symbol. Any undefined reference to symbol + /// will be resolved to __wrap_symbol. Any undefined reference to + /// __real_symbol will be resolved to symbol. This can be used to provide a + /// wrapper for a system function. The wrapper function should be called + /// __wrap_symbol. If it wishes to call the system function, it should call + /// __real_symbol. + symbol_wrap_set: std.StringArrayHashMapUnmanaged(void), version: ?std.builtin.Version, compatibility_version: ?std.builtin.Version, |
