From 219f9bad8306a8766e25b06116fece3f027cbeef Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 19 Jan 2018 04:27:38 +0000 Subject: [PATCH] cmd/go: recognize AIX objects and archives Reviewed-on: https://go-review.googlesource.com/88275 From-SVN: r256873 --- gcc/go/gofrontend/MERGE | 2 +- libgo/go/cmd/go/internal/work/exec.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 1a51e104084..a16df7a5a2a 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/libgo/go/cmd/go/internal/work/exec.go b/libgo/go/cmd/go/internal/work/exec.go index 7e3f695e6f3..c2704c4335e 100644 --- a/libgo/go/cmd/go/internal/work/exec.go +++ b/libgo/go/cmd/go/internal/work/exec.go @@ -1282,6 +1282,7 @@ func (b *Builder) cover(a *Action, dst, src string, perm os.FileMode, varName st 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 { -- 2.30.2