| ... | @@ -1654,10 +1654,10 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v | ... | @@ -1654,10 +1654,10 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v |
| 1654 | try argv.append("-pie"); | 1654 | try argv.append("-pie"); |
| 1655 | } | 1655 | } |
| 1656 | | 1656 | |
| 1657 | if (self.base.options.link_mode == .Dynamic and target.os.tag == .netbsd) { | 1657 | if (is_dyn_lib and target.os.tag == .netbsd) { |
| 1658 | // Add options to produce shared objects with only 2 PT_LOAD segments. | 1658 | // Add options to produce shared objects with only 2 PT_LOAD segments. |
| 1659 | // NetBSD expects 2 PT_LOAD segments in a shared object, otherwise | 1659 | // NetBSD expects 2 PT_LOAD segments in a shared object, otherwise |
| 1660 | // ld.elf_so fails to load, emitting a general "not found" error. | 1660 | // ld.elf_so fails loading dynamic libraries with "not found" error. |
| 1661 | // See https://github.com/ziglang/zig/issues/9109 . | 1661 | // See https://github.com/ziglang/zig/issues/9109 . |
| 1662 | try argv.append("--no-rosegment"); | 1662 | try argv.append("--no-rosegment"); |
| 1663 | try argv.append("-znorelro"); | 1663 | try argv.append("-znorelro"); |