diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-02-16 18:36:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-16 18:36:57 -0500 |
| commit | f911c933b287bd9f27b6b5f977a671aef05ca6c9 (patch) | |
| tree | 9aa4295a424cac5c3509fb351c63e3a51e3c8ffb /src/main.zig | |
| parent | 438b71155a6e86263c61a664a1af596fe9b210bd (diff) | |
| parent | 61da9a25b97289f0b1820ae2eae60066a7a871d8 (diff) | |
| download | zig-f911c933b287bd9f27b6b5f977a671aef05ca6c9.tar.gz zig-f911c933b287bd9f27b6b5f977a671aef05ca6c9.zip | |
Merge pull request #11912 from motiejus/wl-no-undefined
[linker] add --no-undefined, -z undefs
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig index cacdb83334..2e83e98fff 100644 --- a/src/main.zig +++ b/src/main.zig @@ -492,6 +492,7 @@ const usage_build_generic = \\ nodelete Indicate that the object cannot be deleted from a process \\ notext Permit read-only relocations in read-only segments \\ defs Force a fatal error if any undefined symbols remain + \\ undefs Reverse of -z defs \\ origin Indicate that the object must have its origin processed \\ nocopyreloc Disable the creation of copy relocations \\ now (default) Force all relocations to be processed on load @@ -1333,6 +1334,8 @@ fn buildOutputType( linker_z_notext = true; } else if (mem.eql(u8, z_arg, "defs")) { linker_z_defs = true; + } else if (mem.eql(u8, z_arg, "undefs")) { + linker_z_defs = false; } else if (mem.eql(u8, z_arg, "origin")) { linker_z_origin = true; } else if (mem.eql(u8, z_arg, "nocopyreloc")) { @@ -1879,6 +1882,8 @@ fn buildOutputType( linker_gc_sections = true; } else if (mem.eql(u8, arg, "-dead_strip_dylibs")) { dead_strip_dylibs = true; + } else if (mem.eql(u8, arg, "--no-undefined")) { + linker_z_defs = true; } else if (mem.eql(u8, arg, "--gc-sections")) { linker_gc_sections = true; } else if (mem.eql(u8, arg, "--no-gc-sections")) { @@ -1944,6 +1949,8 @@ fn buildOutputType( linker_z_notext = true; } else if (mem.eql(u8, z_arg, "defs")) { linker_z_defs = true; + } else if (mem.eql(u8, z_arg, "undefs")) { + linker_z_defs = false; } else if (mem.eql(u8, z_arg, "origin")) { linker_z_origin = true; } else if (mem.eql(u8, z_arg, "nocopyreloc")) { |
