| ... | ... | @@ -1570,6 +1570,12 @@ pub const LibExeObjStep = struct { |
| 1570 | 1570 | /// Permit read-only relocations in read-only segments. Disallowed by default. |
| 1571 | 1571 | link_z_notext: bool = false, |
| 1572 | 1572 | |
| 1573 | /// Force all relocations to be read-only after processing. |
| 1574 | link_z_relro: bool = true, |
| 1575 | |
| 1576 | /// Allow relocations to be lazily processed after load. |
| 1577 | link_z_lazy: bool = false, |
| 1578 | |
| 1573 | 1579 | /// (Darwin) Install name for the dylib |
| 1574 | 1580 | install_name: ?[]const u8 = null, |
| 1575 | 1581 | |
| ... | ... | @@ -2577,6 +2583,14 @@ pub const LibExeObjStep = struct { |
| 2577 | 2583 | try zig_args.append("-z"); |
| 2578 | 2584 | try zig_args.append("notext"); |
| 2579 | 2585 | } |
| 2586 | if (!self.link_z_relro) { |
| 2587 | try zig_args.append("-z"); |
| 2588 | try zig_args.append("norelro"); |
| 2589 | } |
| 2590 | if (self.link_z_lazy) { |
| 2591 | try zig_args.append("-z"); |
| 2592 | try zig_args.append("lazy"); |
| 2593 | } |
| 2580 | 2594 | |
| 2581 | 2595 | if (self.libc_file) |libc_file| { |
| 2582 | 2596 | try zig_args.append("--libc"); |