Skip to content

Commit b0bcd7a

Browse files
Clément Chigotianlancetaylor
Clément Chigot
authored andcommitted
cmd/go: add a note in help buildmode for c-archive on AIX
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 <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent 2cc17bc commit b0bcd7a

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/cmd/go/alldocs.go

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/cmd/go/internal/help/helpdoc.go

+3
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,9 @@ are:
689689
-buildmode=plugin
690690
Build the listed main packages, plus all packages that they
691691
import, into a Go plugin. Packages not named main are ignored.
692+
693+
On AIX, when linking a C program that uses a Go archive built with
694+
-buildmode=c-archive, you must pass -Wl,-bnoobjreorder to the C compiler.
692695
`,
693696
}
694697

0 commit comments

Comments
 (0)