func skipIfNotELF(t *testing.T) {
	switch runtime.GOOS {
	case "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "solaris", "illumos":
	default:
		t.Skipf("skipping on non-ELF system %s", runtime.GOOS)
	}
}
skipIfNotELF skips the test if we are not running on an ELF system.
These tests open and examine the test binary, and use elf.Open to do so.
package gosym
import (
	"bytes"
	"compress/gzip"
	"debug/elf"
	"internal/testenv"
	"io/ioutil"
	"os"
	"os/exec"
	"path/filepath"
	"runtime"
	"strings"
	"testing"
)
var (
	pclineTempDir    string
	pclinetestBinary string
)
func dotest(t *testing.T) {
	testenv.MustHaveGoBuild(t)
	if runtime.GOARCH != "amd64" {
		t.Skipf("skipping on non-AMD64 system %s", runtime.GOARCH)
	}
	var err error
	pclineTempDir, err = ioutil.TempDir("", "pclinetest")
	if err != nil {
		t.Fatal(err)
	}
	pclinetestBinary = filepath.Join(pclineTempDir, "pclinetest")
	cmd := exec.Command(testenv.GoToolPath(t), "build", "-o", pclinetestBinary)
	cmd.Dir = "testdata"
	cmd.Env = append(os.Environ(), "GOOS=linux")
	cmd.Stdout = os.Stdout
	cmd.Stderr = os.Stderr
	if err := cmd.Run(); err != nil {
		t.Fatal(err)
	}
}
func endtest() {
	if pclineTempDir != "" {
		os.RemoveAll(pclineTempDir)
		pclineTempDir = ""
		pclinetestBinary = ""
	}
}