| ... | ... | @@ -185,14 +185,17 @@ fn cmdObjCopy( |
| 185 | 185 | fatal("zig objcopy: ELF to RAW or HEX copying does not support --strip", .{}); |
| 186 | 186 | if (opt_extract != null) |
| 187 | 187 | fatal("zig objcopy: ELF to RAW or HEX copying does not support --extract-to", .{}); |
| 188 | if (add_section != null) |
| 189 | fatal("zig objcopy: ELF to RAW or HEX copying does not support --add-section", .{}); |
| 190 | if (set_section_alignment != null) |
| 191 | fatal("zig objcopy: ELF to RAW or HEX copying does not support --set_section_alignment", .{}); |
| 192 | if (set_section_flags != null) |
| 193 | fatal("zig objcopy: ELF to RAW or HEX copying does not support --set_section_flags", .{}); |
| 188 | 194 | |
| 189 | 195 | try emitElf(arena, in_file, out_file, elf_hdr, .{ |
| 190 | 196 | .ofmt = out_fmt, |
| 191 | 197 | .only_section = only_section, |
| 192 | 198 | .pad_to = pad_to, |
| 193 | | .add_section = add_section, |
| 194 | | .set_section_alignment = set_section_alignment, |
| 195 | | .set_section_flags = set_section_flags, |
| 196 | 199 | }); |
| 197 | 200 | }, |
| 198 | 201 | .elf => { |
| ... | ... | @@ -279,9 +282,9 @@ pub const EmitRawElfOptions = struct { |
| 279 | 282 | ofmt: std.Target.ObjectFormat, |
| 280 | 283 | only_section: ?[]const u8 = null, |
| 281 | 284 | pad_to: ?u64 = null, |
| 282 | | add_section: ?AddSection, |
| 283 | | set_section_alignment: ?SetSectionAlignment, |
| 284 | | set_section_flags: ?SetSectionFlags, |
| 285 | add_section: ?AddSection = null, |
| 286 | set_section_alignment: ?SetSectionAlignment = null, |
| 287 | set_section_flags: ?SetSectionFlags = null, |
| 285 | 288 | }; |
| 286 | 289 | |
| 287 | 290 | const AddSection = struct { |