@@ -556,9 +556,9 @@ pub const File = struct {
556556 const comp = base .comp ;
557557 const gpa = comp .gpa ;
558558 switch (base .tag ) {
559- .coff , .elf , .macho , .plan9 , .wasm = > {
559+ .coff , .elf , .macho , .plan9 , .wasm , .goff , .xcoff = > {
560560 if (base .file != null ) return ;
561- dev .checkAny (&.{ .coff_linker , .elf_linker , .macho_linker , .plan9_linker , .wasm_linker });
561+ dev .checkAny (&.{ .coff_linker , .elf_linker , .macho_linker , .plan9_linker , .wasm_linker , .goff_linker , .xcoff_linker });
562562 const emit = base .emit ;
563563 if (base .child_pid ) | pid | {
564564 if (builtin .os .tag == .windows ) {
@@ -650,8 +650,8 @@ pub const File = struct {
650650 }
651651 }
652652 },
653- .coff , .macho , .plan9 , .wasm = > if (base .file ) | f | {
654- dev .checkAny (&.{ .coff_linker , .macho_linker , .plan9_linker , .wasm_linker });
653+ .coff , .macho , .plan9 , .wasm , .goff , .xcoff = > if (base .file ) | f | {
654+ dev .checkAny (&.{ .coff_linker , .macho_linker , .plan9_linker , .wasm_linker , .goff_linker , .xcoff_linker });
655655 if (base .zcu_object_sub_path != null ) {
656656 // The file we have open is not the final file that we want to
657657 // make executable, so we don't have to close it.
@@ -767,6 +767,7 @@ pub const File = struct {
767767
768768 switch (base .tag ) {
769769 .spirv , .nvptx = > {},
770+ .goff , .xcoff = > {},
770771 inline else = > | tag | {
771772 dev .check (tag .devFeature ());
772773 return @as (* tag .Type (), @fieldParentPtr ("base" , base )).updateLineNumber (pt , ti_id );
@@ -902,6 +903,7 @@ pub const File = struct {
902903 .spirv = > unreachable ,
903904 .nvptx = > unreachable ,
904905 .wasm = > unreachable ,
906+ .goff , .xcoff = > unreachable ,
905907 inline else = > | tag | {
906908 dev .check (tag .devFeature ());
907909 return @as (* tag .Type (), @fieldParentPtr ("base" , base )).getNavVAddr (pt , nav_index , reloc_info );
@@ -921,6 +923,7 @@ pub const File = struct {
921923 .spirv = > unreachable ,
922924 .nvptx = > unreachable ,
923925 .wasm = > unreachable ,
926+ .goff , .xcoff = > unreachable ,
924927 inline else = > | tag | {
925928 dev .check (tag .devFeature ());
926929 return @as (* tag .Type (), @fieldParentPtr ("base" , base )).lowerUav (pt , decl_val , decl_align , src_loc );
@@ -934,6 +937,7 @@ pub const File = struct {
934937 .spirv = > unreachable ,
935938 .nvptx = > unreachable ,
936939 .wasm = > unreachable ,
940+ .goff , .xcoff = > unreachable ,
937941 inline else = > | tag | {
938942 dev .check (tag .devFeature ());
939943 return @as (* tag .Type (), @fieldParentPtr ("base" , base )).getUavVAddr (decl_val , reloc_info );
@@ -950,6 +954,8 @@ pub const File = struct {
950954 .plan9 ,
951955 .spirv ,
952956 .nvptx ,
957+ .goff ,
958+ .xcoff ,
953959 = > {},
954960
955961 inline else = > | tag | {
@@ -1246,6 +1252,8 @@ pub const File = struct {
12461252 spirv ,
12471253 plan9 ,
12481254 nvptx ,
1255+ goff ,
1256+ xcoff ,
12491257
12501258 pub fn Type (comptime tag : Tag ) type {
12511259 return switch (tag ) {
@@ -1257,6 +1265,8 @@ pub const File = struct {
12571265 .spirv = > SpirV ,
12581266 .plan9 = > Plan9 ,
12591267 .nvptx = > NvPtx ,
1268+ .goff = > Goff ,
1269+ .xcoff = > Xcoff ,
12601270 };
12611271 }
12621272
@@ -1270,8 +1280,8 @@ pub const File = struct {
12701280 .c = > .c ,
12711281 .spirv = > .spirv ,
12721282 .nvptx = > .nvptx ,
1273- .goff = > @panic ( "TODO implement goff object format" ) ,
1274- .xcoff = > @panic ( "TODO implement xcoff object format" ) ,
1283+ .goff = > . goff ,
1284+ .xcoff = > . xcoff ,
12751285 .hex = > @panic ("TODO implement hex object format" ),
12761286 .raw = > @panic ("TODO implement raw object format" ),
12771287 };
@@ -1377,6 +1387,8 @@ pub const File = struct {
13771387 pub const SpirV = @import ("link/SpirV.zig" );
13781388 pub const Wasm = @import ("link/Wasm.zig" );
13791389 pub const NvPtx = @import ("link/NvPtx.zig" );
1390+ pub const Goff = @import ("link/Goff.zig" );
1391+ pub const Xcoff = @import ("link/Xcoff.zig" );
13801392 pub const Dwarf = @import ("link/Dwarf.zig" );
13811393};
13821394
0 commit comments