- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 51 for LinkMode (0.25 sec)
-
src/cmd/dist/test.go
// cgoTest we want static linking. gt.buildmode = "" if linkmode == "external" { ldflags = append(ldflags, `-extldflags "-static -pthread"`) } else if linkmode == "auto" { gt.env = append(gt.env, "CGO_LDFLAGS=-static -pthread") } else { panic("unknown linkmode with static build: " + linkmode) } gt.tags = append(gt.tags, "static") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 16:01:35 UTC 2024 - 50K bytes - Viewed (0) -
src/cmd/link/link_test.go
// deterministic. linktmp := filepath.Join(tmpdir, "linktmp") if err := os.Mkdir(linktmp, 0777); err != nil { t.Fatal(err) } // Link with -v -linkmode=external to see the flags we pass to the // external linker. ldflags := "-ldflags=-v -linkmode=external -tmpdir=" + linktmp var out0 []byte for i := 0; i < 5; i++ { cmd := testenv.Command(t, testenv.GoToolPath(t), "build", ldflags, "-o", exe, src)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 20:26:02 UTC 2024 - 43.5K bytes - Viewed (0) -
src/cmd/go/testdata/script/cgo_undef.txt
# the linker to report an inability to internally link. [short] skip [!cgo] skip [!exec:ar] skip cc -c -o a/b.syso b/b.c cc -c -o b/lib.o b/lib.c exec ar rc a/libb.a b/lib.o go build ! go build -ldflags=-linkmode=internal stderr 'some packages could not be built to support internal linking.*m/c|requires external linking|does not support internal cgo' -- go.mod -- module m -- a/a.go -- package a
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 22 20:56:07 UTC 2022 - 1.6K bytes - Viewed (0) -
src/cmd/link/internal/ld/elf.go
elfshbits(ctxt.LinkMode, sect) } for _, sect := range Segrodata.Sections { elfshbits(ctxt.LinkMode, sect) } for _, sect := range Segrelrodata.Sections { elfshbits(ctxt.LinkMode, sect) } for _, sect := range Segdata.Sections { elfshbits(ctxt.LinkMode, sect) } for _, sect := range Segdwarf.Sections { elfshbits(ctxt.LinkMode, sect) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 13:29:54 UTC 2024 - 63.6K bytes - Viewed (0) -
src/cmd/link/internal/ld/data_test.go
ctxt := linknew(arch) ctxt.HeadType = ht er := loader.ErrorReporter{} ctxt.loader = loader.NewLoader(0, &er) ctxt.BuildMode.Set(bm) ctxt.LinkMode.Set(lm) ctxt.IsELF = iself ctxt.mustSetHeadType() ctxt.setArchSyms() return ctxt } // Make sure the addgotsym properly increases the symbols. func TestAddGotSym(t *testing.T) { tests := []struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 05 19:20:01 UTC 2023 - 2.3K bytes - Viewed (0) -
src/cmd/go/testdata/script/cgo_suspect_flag_force_external.txt
# Fifth build: explicit CGO, but we specifically asked for internal linking # via a flag, so using internal linking it is. [cgolinkext] go list ./usesInternalCgo [!cgolinkext] go build '-ldflags=-tmpdir=tmp5 -linkmode=internal' -o $devnull ./usesInternalCgo & # Sixth build: explicit CGO use in a non-main package. go build -o p.a ./nonMainPackageUsesExplicitCgo & wait # Check first build: no external linking expected
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 25 18:16:01 UTC 2023 - 6.3K bytes - Viewed (0) -
src/cmd/link/elf_test.go
{{range $index, $element := .}} fmt.Println(V{{$index}}) {{end}} } ` func TestPIESize(t *testing.T) { testenv.MustHaveGoBuild(t) // We don't want to test -linkmode=external if cgo is not supported. // On some systems -buildmode=pie implies -linkmode=external, so just // always skip the test if cgo is not supported. testenv.MustHaveCGO(t)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Sep 18 16:34:01 UTC 2023 - 13.7K bytes - Viewed (0) -
src/cmd/internal/obj/riscv/asm_test.go
cmd.Dir = dir cmd.Env = append(os.Environ(), "GOARCH=riscv64", "GOOS=linux") out, err := cmd.CombinedOutput() if err != nil { t.Errorf("Build failed: %v, output: %s", err, out) } if runtime.GOARCH == "riscv64" && testenv.HasCGO() { cmd := testenv.Command(t, testenv.GoToolPath(t), "build", "-ldflags=-linkmode=external") cmd.Dir = dir
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 22 01:50:18 UTC 2023 - 7.9K bytes - Viewed (0) -
src/cmd/link/linkbig_test.go
} // Build and run with external linking cmd = testenv.Command(t, testenv.GoToolPath(t), "build", "-o", "bigtext", "-ldflags", "-linkmode=external") cmd.Dir = tmpdir out, err = cmd.CombinedOutput() if err != nil { t.Fatalf("Build failed for big text program with external linking: %v, output: %s", err, out) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 15 20:22:14 UTC 2022 - 3.5K bytes - Viewed (0) -
src/cmd/link/internal/riscv64/asm.go
default: ctxt.Errorf(s, "trampoline called with non-jump reloc: %d (%s)", r.Type(), sym.RelocName(ctxt.Arch, r.Type())) } } func genCallTramp(arch *sys.Arch, linkmode ld.LinkMode, ldr *loader.Loader, tramp *loader.SymbolBuilder, target loader.Sym, offset int64) { tramp.AddUint32(arch, 0x00000f97) // AUIPC $0, X31 tramp.AddUint32(arch, 0x000f8067) // JALR X0, (X31)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 01 08:06:08 UTC 2024 - 22.8K bytes - Viewed (0)