I met some Error infos: missing section for relocation target type


(CsqShz) #1

I use Yocto-project to build consul.
It works with go-1.11, but compile failed with go-1.12.
I use the same script to build consul for both compile.

But with go-1.12, if I remove -linkshared argument, it also works.

The Error info is as following:
# github.com/hashicorp/consul/connect/certgen
type…eUfRrckI: missing section for relocation target type…FEeY9FdU
type…eUfRrckI: reloc 8 (R_CALL) to non-elf symbol type…FEeY9FdU (outer=type…FEeY9FdU) 49 (SABIALIAS)

# github.com/hashicorp/consul
type…eUfRrckI: missing section for relocation target type…FEeY9FdU
type…K6Uq9NPs: missing section for relocation target type…tBBUxeDj

The above prompt are from /usr/lib/go-1.12/src/cmd/link/internal/ld/data.go

The main command in the script is as following picture:
It failed at line:130(-linkshared):

Could someone give me some inspiration to fix or locate the issue?
Thanks.