As ld on AIX doesn't keep the same layout in .text section,
-Wl,-bnoobjreoder must be passed to gcc when building a C program with a
Go archive.
Change-Id: I89b584cce43ab5792f315192b073923c10d5690e
Reviewed-on: https://go-review.googlesource.com/c/go/+/170538
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
// Build the listed main packages, plus all packages that they
// import, into a Go plugin. Packages not named main are ignored.
//
+// On AIX, when linking a C program that uses a Go archive built with
+// -buildmode=c-archive, you must pass -Wl,-bnoobjreorder to the C compiler.
+//
//
// Calling between Go and C
//
-buildmode=plugin
Build the listed main packages, plus all packages that they
import, into a Go plugin. Packages not named main are ignored.
+
+On AIX, when linking a C program that uses a Go archive built with
+-buildmode=c-archive, you must pass -Wl,-bnoobjreorder to the C compiler.
`,
}