- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 51 for LinkMode (0.13 sec)
-
src/cmd/link/internal/ld/config.go
} return fmt.Sprintf("BuildMode(%d)", uint8(mode)) } // LinkMode indicates whether an external linker is used for the final link. type LinkMode uint8 const ( LinkAuto LinkMode = iota LinkInternal LinkExternal ) func (mode *LinkMode) Set(s string) error { switch s { default: return fmt.Errorf("invalid linkmode: %q", s) case "auto": *mode = LinkAuto case "internal":
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Aug 23 05:14:11 UTC 2023 - 5.6K bytes - Viewed (0) -
test/fixedbugs/issue10607.go
test("external") // The 'cgo' build constraint should imply that a linker is available. } func test(linkmode string) { out, err := exec.Command("go", "run", "-ldflags", "-B=0x12345678 -linkmode="+linkmode, filepath.Join("fixedbugs", "issue10607a.go")).CombinedOutput() if err != nil { fmt.Printf("BUG: linkmode=%s %v\n%s\n", linkmode, err, out) os.Exit(1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:25 UTC 2023 - 776 bytes - Viewed (0) -
src/cmd/go/testdata/script/build_static.txt
exec ./hello stdout Hello # Building with -linkmode=external should not say anything about # runtime/cgo (issue #31544). go build -ldflags=-linkmode=external ! stderr runtime/cgo exec ./hello stdout Hello # Some targets don't support -static [GOOS:darwin] skip 'no static linking on Darwin' [GOOS:solaris] skip 'no static linking on Solaris' # Building with -linkmode=external -extldflags=-static should work.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 20 22:03:35 UTC 2023 - 926 bytes - Viewed (0) -
src/cmd/go/note_test.go
} tg.run("build", "-ldflags", "-buildid="+buildID+" -linkmode=external", "-o", tg.path("hello2.exe"), tg.path("hello.go")) id, err = buildid.ReadFile(tg.path("hello2.exe")) if err != nil { t.Fatalf("reading build ID from hello binary (linkmode=external): %v", err) } if id != buildID { t.Fatalf("buildID in hello binary = %q, want %q (linkmode=external)", id, buildID) } switch runtime.GOOS {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 20 17:26:46 UTC 2023 - 2.5K bytes - Viewed (0) -
src/cmd/link/internal/ld/target.go
import ( "cmd/internal/objabi" "cmd/internal/sys" "encoding/binary" ) // Target holds the configuration we're building for. type Target struct { Arch *sys.Arch HeadType objabi.HeadType LinkMode LinkMode BuildMode BuildMode linkShared bool canUsePlugins bool IsELF bool } // // Target type functions // func (t *Target) IsExe() bool { return t.BuildMode == BuildModeExe
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 13 21:14:48 UTC 2022 - 3.9K bytes - Viewed (0) -
src/cmd/cgo/internal/test/issue7234_test.go
import "testing" // This test actually doesn't have anything to do with cgo. It is a // test of https://golang.org/issue/7234, a compiler/linker bug in // handling string constants when using -linkmode=external. The test // is in this directory because we routinely test -linkmode=external // here. var v7234 = [...]string{"runtime/cgo"} func Test7234(t *testing.T) { if v7234[0] != "runtime/cgo" { t.Errorf("bad string constant %q", v7234[0]) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 634 bytes - Viewed (0) -
src/cmd/link/internal/ld/go.go
// the lists used for roots in the deadcode pass. if f[0] == "cgo_export_static" { if ctxt.LinkMode == LinkExternal && !l.AttrCgoExportStatic(s) { // Static cgo exports appear // in the exported symbol table. ctxt.dynexp = append(ctxt.dynexp, s) } if ctxt.LinkMode == LinkInternal { // For internal linking, we're // responsible for resolving
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 22 16:48:30 UTC 2023 - 11.2K bytes - Viewed (0) -
src/cmd/go/testdata/script/test_ppc64_linker_funcs.txt
# # Verifies golang.org/issue/52366 for linux/ppc64le [!GOOS:linux] skip [!compiler:gc] skip [!cgo] skip [!GOARCH:ppc64le] skip go build -ldflags='-linkmode=internal' exec ./abitest stdout success go build -buildmode=pie -o abitest.pie -ldflags='-linkmode=internal' exec ./abitest.pie stdout success -- go.mod -- module abitest -- abitest.go -- package main /* #cgo CFLAGS: -Os
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 20:54:08 UTC 2024 - 1K bytes - Viewed (0) -
src/cmd/link/internal/ld/pe.go
func (sect *peSection) write(out *OutBuf, linkmode LinkMode) error { h := pe.SectionHeader32{ VirtualSize: sect.virtualSize, SizeOfRawData: sect.sizeOfRawData, PointerToRawData: sect.pointerToRawData, PointerToRelocations: sect.pointerToRelocations, NumberOfRelocations: sect.numberOfRelocations, Characteristics: sect.characteristics, } if linkmode != LinkExternal {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 09 19:01:27 UTC 2023 - 48.8K bytes - Viewed (0) -
src/cmd/go/testdata/script/version_build_settings.txt
[cgo] env CGO_CFLAGS=-DFROM_CFLAGS=1 [cgo] env CGO_CXXFLAGS=-DFROM_CXXFLAGS=1 [cgo] env CGO_LDFLAGS=-L/extra/dir/does/not/exist [cgo] go build '-ldflags=all=-linkmode=external -extldflags=-L/bonus/dir/does/not/exist' [cgo] go version -m m$GOEXE [cgo] stdout '^\tbuild\t-ldflags="all=-linkmode=external -extldflags=-L/bonus/dir/does/not/exist"$' [cgo] stdout '^\tbuild\tCGO_ENABLED=1$' [cgo] stdout '^\tbuild\tCGO_CPPFLAGS=-DFROM_CPPFLAGS=1$'
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 24 21:26:10 UTC 2022 - 2.7K bytes - Viewed (0)