@@ -556,9 +556,9 @@ pub const File = struct {
556
556
const comp = base .comp ;
557
557
const gpa = comp .gpa ;
558
558
switch (base .tag ) {
559
- .coff , .elf , .macho , .plan9 , .wasm = > {
559
+ .coff , .elf , .macho , .plan9 , .wasm , .goff , .xcoff = > {
560
560
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 });
562
562
const emit = base .emit ;
563
563
if (base .child_pid ) | pid | {
564
564
if (builtin .os .tag == .windows ) {
@@ -650,8 +650,8 @@ pub const File = struct {
650
650
}
651
651
}
652
652
},
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 });
655
655
if (base .zcu_object_sub_path != null ) {
656
656
// The file we have open is not the final file that we want to
657
657
// make executable, so we don't have to close it.
@@ -767,6 +767,7 @@ pub const File = struct {
767
767
768
768
switch (base .tag ) {
769
769
.spirv , .nvptx = > {},
770
+ .goff , .xcoff = > {},
770
771
inline else = > | tag | {
771
772
dev .check (tag .devFeature ());
772
773
return @as (* tag .Type (), @fieldParentPtr ("base" , base )).updateLineNumber (pt , ti_id );
@@ -902,6 +903,7 @@ pub const File = struct {
902
903
.spirv = > unreachable ,
903
904
.nvptx = > unreachable ,
904
905
.wasm = > unreachable ,
906
+ .goff , .xcoff = > unreachable ,
905
907
inline else = > | tag | {
906
908
dev .check (tag .devFeature ());
907
909
return @as (* tag .Type (), @fieldParentPtr ("base" , base )).getNavVAddr (pt , nav_index , reloc_info );
@@ -921,6 +923,7 @@ pub const File = struct {
921
923
.spirv = > unreachable ,
922
924
.nvptx = > unreachable ,
923
925
.wasm = > unreachable ,
926
+ .goff , .xcoff = > unreachable ,
924
927
inline else = > | tag | {
925
928
dev .check (tag .devFeature ());
926
929
return @as (* tag .Type (), @fieldParentPtr ("base" , base )).lowerUav (pt , decl_val , decl_align , src_loc );
@@ -934,6 +937,7 @@ pub const File = struct {
934
937
.spirv = > unreachable ,
935
938
.nvptx = > unreachable ,
936
939
.wasm = > unreachable ,
940
+ .goff , .xcoff = > unreachable ,
937
941
inline else = > | tag | {
938
942
dev .check (tag .devFeature ());
939
943
return @as (* tag .Type (), @fieldParentPtr ("base" , base )).getUavVAddr (decl_val , reloc_info );
@@ -950,6 +954,8 @@ pub const File = struct {
950
954
.plan9 ,
951
955
.spirv ,
952
956
.nvptx ,
957
+ .goff ,
958
+ .xcoff ,
953
959
= > {},
954
960
955
961
inline else = > | tag | {
@@ -1246,6 +1252,8 @@ pub const File = struct {
1246
1252
spirv ,
1247
1253
plan9 ,
1248
1254
nvptx ,
1255
+ goff ,
1256
+ xcoff ,
1249
1257
1250
1258
pub fn Type (comptime tag : Tag ) type {
1251
1259
return switch (tag ) {
@@ -1257,6 +1265,8 @@ pub const File = struct {
1257
1265
.spirv = > SpirV ,
1258
1266
.plan9 = > Plan9 ,
1259
1267
.nvptx = > NvPtx ,
1268
+ .goff = > Goff ,
1269
+ .xcoff = > Xcoff ,
1260
1270
};
1261
1271
}
1262
1272
@@ -1270,8 +1280,8 @@ pub const File = struct {
1270
1280
.c = > .c ,
1271
1281
.spirv = > .spirv ,
1272
1282
.nvptx = > .nvptx ,
1273
- .goff = > @panic ( "TODO implement goff object format" ) ,
1274
- .xcoff = > @panic ( "TODO implement xcoff object format" ) ,
1283
+ .goff = > . goff ,
1284
+ .xcoff = > . xcoff ,
1275
1285
.hex = > @panic ("TODO implement hex object format" ),
1276
1286
.raw = > @panic ("TODO implement raw object format" ),
1277
1287
};
@@ -1377,6 +1387,8 @@ pub const File = struct {
1377
1387
pub const SpirV = @import ("link/SpirV.zig" );
1378
1388
pub const Wasm = @import ("link/Wasm.zig" );
1379
1389
pub const NvPtx = @import ("link/NvPtx.zig" );
1390
+ pub const Goff = @import ("link/Goff.zig" );
1391
+ pub const Xcoff = @import ("link/Xcoff.zig" );
1380
1392
pub const Dwarf = @import ("link/Dwarf.zig" );
1381
1393
};
1382
1394
0 commit comments