This patch by Tony Reix adds code to the go tool to recognize AIX objects and archives. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline.
Ian
Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 256872) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -6b4f1391e2cd637fa5ed797bb3ab43d9ede61997 +cf33aedb66b5121708f5640443c1336080a47fe5 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/go/cmd/go/internal/work/exec.go =================================================================== --- libgo/go/cmd/go/internal/work/exec.go (revision 256794) +++ libgo/go/cmd/go/internal/work/exec.go (working copy) @@ -1282,6 +1282,7 @@ func (b *Builder) cover(a *Action, dst, var objectMagic = [][]byte{ {'!', '<', 'a', 'r', 'c', 'h', '>', '\n'}, // Package archive + {'<', 'b', 'i', 'g', 'a', 'f', '>', '\n'}, // Package AIX big archive {'\x7F', 'E', 'L', 'F'}, // ELF {0xFE, 0xED, 0xFA, 0xCE}, // Mach-O big-endian 32-bit {0xFE, 0xED, 0xFA, 0xCF}, // Mach-O big-endian 64-bit @@ -1291,6 +1292,8 @@ var objectMagic = [][]byte{ {0x00, 0x00, 0x01, 0xEB}, // Plan 9 i386 {0x00, 0x00, 0x8a, 0x97}, // Plan 9 amd64 {0x00, 0x00, 0x06, 0x47}, // Plan 9 arm + {0x01, 0xDF}, // XCOFF32 + {0x01, 0xF7}, // XCOFF64 } func isObject(s string) bool {