| ... | @@ -434,8 +434,10 @@ const usage_build_generic = | ... | @@ -434,8 +434,10 @@ const usage_build_generic = |
| 434 | \\ origin Indicate that the object must have its origin processed | 434 | \\ origin Indicate that the object must have its origin processed |
| 435 | \\ nocopyreloc Disable the creation of copy relocations | 435 | \\ nocopyreloc Disable the creation of copy relocations |
| 436 | \\ noexecstack Indicate that the object requires an executable stack | 436 | \\ noexecstack Indicate that the object requires an executable stack |
| 437 | \\ now Force all relocations to be processed on load | 437 | \\ now (default) Force all relocations to be processed on load |
| 438 | \\ relro Force all relocations to be resolved and be read-only on load | 438 | \\ lazy Don't force all relocations to be processed on load |
| | 439 | \\ relro (default) Force all relocations to be read-only after processing |
| | 440 | \\ norelro Don't force all relocations to be read-only after processing |
| 439 | \\ -dynamic Force output to be dynamically linked | 441 | \\ -dynamic Force output to be dynamically linked |
| 440 | \\ -static Force output to be statically linked | 442 | \\ -static Force output to be statically linked |
| 441 | \\ -Bsymbolic Bind global references locally | 443 | \\ -Bsymbolic Bind global references locally |
| ... | @@ -655,8 +657,8 @@ fn buildOutputType( | ... | @@ -655,8 +657,8 @@ fn buildOutputType( |
| 655 | var linker_z_defs = false; | 657 | var linker_z_defs = false; |
| 656 | var linker_z_origin = false; | 658 | var linker_z_origin = false; |
| 657 | var linker_z_noexecstack = false; | 659 | var linker_z_noexecstack = false; |
| 658 | var linker_z_now = false; | 660 | var linker_z_now = true; |
| 659 | var linker_z_relro = false; | 661 | var linker_z_relro = true; |
| 660 | var linker_tsaware = false; | 662 | var linker_tsaware = false; |
| 661 | var linker_nxcompat = false; | 663 | var linker_nxcompat = false; |
| 662 | var linker_dynamicbase = false; | 664 | var linker_dynamicbase = false; |
| ... | @@ -1209,8 +1211,12 @@ fn buildOutputType( | ... | @@ -1209,8 +1211,12 @@ fn buildOutputType( |
| 1209 | linker_z_noexecstack = true; | 1211 | linker_z_noexecstack = true; |
| 1210 | } else if (mem.eql(u8, z_arg, "now")) { | 1212 | } else if (mem.eql(u8, z_arg, "now")) { |
| 1211 | linker_z_now = true; | 1213 | linker_z_now = true; |
| | 1214 | } else if (mem.eql(u8, z_arg, "lazy")) { |
| | 1215 | linker_z_now = false; |
| 1212 | } else if (mem.eql(u8, z_arg, "relro")) { | 1216 | } else if (mem.eql(u8, z_arg, "relro")) { |
| 1213 | linker_z_relro = true; | 1217 | linker_z_relro = true; |
| | 1218 | } else if (mem.eql(u8, z_arg, "norelro")) { |
| | 1219 | linker_z_relro = false; |
| 1214 | } else { | 1220 | } else { |
| 1215 | warn("unsupported linker extension flag: -z {s}", .{z_arg}); | 1221 | warn("unsupported linker extension flag: -z {s}", .{z_arg}); |
| 1216 | } | 1222 | } |
| ... | @@ -1691,8 +1697,12 @@ fn buildOutputType( | ... | @@ -1691,8 +1697,12 @@ fn buildOutputType( |
| 1691 | linker_z_noexecstack = true; | 1697 | linker_z_noexecstack = true; |
| 1692 | } else if (mem.eql(u8, z_arg, "now")) { | 1698 | } else if (mem.eql(u8, z_arg, "now")) { |
| 1693 | linker_z_now = true; | 1699 | linker_z_now = true; |
| | 1700 | } else if (mem.eql(u8, z_arg, "lazy")) { |
| | 1701 | linker_z_now = false; |
| 1694 | } else if (mem.eql(u8, z_arg, "relro")) { | 1702 | } else if (mem.eql(u8, z_arg, "relro")) { |
| 1695 | linker_z_relro = true; | 1703 | linker_z_relro = true; |
| | 1704 | } else if (mem.eql(u8, z_arg, "norelro")) { |
| | 1705 | linker_z_relro = false; |
| 1696 | } else { | 1706 | } else { |
| 1697 | warn("unsupported linker extension flag: -z {s}", .{z_arg}); | 1707 | warn("unsupported linker extension flag: -z {s}", .{z_arg}); |
| 1698 | } | 1708 | } |