diff --git a/lib/std/build.zig b/lib/std/build.zig index 88d416bee6..de93d0bd1c 100644 --- a/lib/std/build.zig +++ b/lib/std/build.zig @@ -2076,8 +2076,8 @@ pub const LibExeObjStep = struct { if (self.link_eh_frame_hdr) { try zig_args.append("--eh-frame-hdr"); } - if(self.link_emit_relocs){ - try zig_args.append("-emit-relocs"); + if(self.link_emit_relocs) { + try zig_args.append("--emit-relocs"); } if (self.link_function_sections) { try zig_args.append("-ffunction-sections"); diff --git a/src/link/Elf.zig b/src/link/Elf.zig index aab7758505..8e7a02114e 100644 --- a/src/link/Elf.zig +++ b/src/link/Elf.zig @@ -1367,7 +1367,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation) !void { } if (self.base.options.emit_relocs) { - try argv.append("-emit-relocs"); + try argv.append("--emit-relocs"); } if (self.base.options.rdynamic) { diff --git a/src/main.zig b/src/main.zig index d365698d11..d8ca5fe640 100644 --- a/src/main.zig +++ b/src/main.zig @@ -273,7 +273,7 @@ const usage_build_generic = \\ -rdynamic Add all symbols to the dynamic symbol table \\ -rpath [path] Add directory to the runtime library search path \\ --eh-frame-hdr Enable C++ exception handling by passing --eh-frame-hdr to linker - \\ -emit-relocs Enable output of relocation sections for post build tools + \\ --emit-relocs Enable output of relocation sections for post build tools \\ -dynamic Force output to be dynamically linked \\ -static Force output to be statically linked \\ -Bsymbolic Bind global references locally