Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 51 for LinkMode (0.39 sec)

  1. src/cmd/link/internal/ld/elf_test.go

    		},
    		{
    			name:             "bindnow-linkmode-internal",
    			args:             []string{"-ldflags", "-bindnow -linkmode=internal"},
    			prog:             progC,
    			mustHaveCGO:      true,
    			mustInternalLink: true,
    			wantDfBindNow:    true,
    			wantDf1Now:       true,
    		},
    		{
    			name:                 "bindnow-pie-linkmode-internal",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 13:44:07 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/macho.go

    			}
    			s := ctxt.loader.Lookup(name, ver)
    			if s != 0 {
    				ctxt.loader.SetAttrCgoExportDynamic(s, false)
    			}
    		}
    	}
    }
    
    func machoadddynlib(lib string, linkmode LinkMode) {
    	if seenlib[lib] || linkmode == LinkExternal {
    		return
    	}
    	seenlib[lib] = true
    
    	// Will need to store the library name rounded up
    	// and 24 bytes of header metadata. If not enough
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:32:53 UTC 2024
    - 43.9K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/version_gc_sections.txt

    # This test checks that external linking with --gc-sections does not strip version information.
    
    [short] skip
    [!cgo] skip
    [GOOS:aix] skip  # no --gc-sections
    [GOOS:darwin] skip  # no --gc-sections
    
    go build -ldflags='-linkmode=external -extldflags=-Wl,--gc-sections'
    go version hello$GOEXE
    ! stdout 'not a Go executable'
    ! stderr 'not a Go executable'
    
    -- go.mod --
    module hello
    -- hello.go --
    package main
    
    /*
    */
    import "C"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 02 15:17:57 UTC 2023
    - 460 bytes
    - Viewed (0)
  4. src/cmd/go/testdata/script/gcflags_patterns.txt

    [!case-sensitive] cd $WORK/GoPath/src/my/cmd/prog
    go build -a -n -ldflags=-X=math.pi=3
    stderr 'link.* -X=math.pi=3'
    
    # cgo.a should not be a dependency of internally-linked go package
    go build -ldflags='-linkmode=external -linkmode=internal' -n prog.go
    ! stderr 'packagefile .*runtime/cgo.a'
    
    -- z1/z.go --
    package z1
    import _ "y"
    import _ "z2"
    
    -- z1/z_test.go --
    package z1_test
    import "testing"
    import _ "z3"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 21 14:58:44 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  5. src/cmd/go/testdata/script/test_ppc64le_cgo_inline_plt.txt

    # Note, older gcc/clang may accept this option, but
    # ignore it if binutils does not support the relocs.
    [!compiler:gc] skip
    [!cgo] skip
    [!GOARCH:ppc64le] skip
    
    env CGO_CFLAGS='-fno-plt -O2 -g'
    
    go build -ldflags='-linkmode=internal'
    exec ./noplttest
    stdout helloworld
    
    -- go.mod --
    module noplttest
    
    -- noplttest.go --
    package main
    
    /*
    #include <stdio.h>
    void helloworld(void) {
       printf("helloworld\n");
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 719 bytes
    - Viewed (0)
  6. src/cmd/go/testdata/script/version.txt

    env GOFLAGS='-m -v'
    go version
    stdout '^go version'
    env GOFLAGS=
    
    env GO111MODULE=on
    
    # Check that very basic version lookup succeeds.
    go build empty.go
    go version empty$GOEXE
    [cgo] go build -ldflags=-linkmode=external empty.go
    [cgo] go version empty$GOEXE
    
    # Skip the remaining builds if we are running in short mode.
    [short] skip
    
    # Check that 'go version' and 'go version -m' work on a binary built in module mode.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 05 14:52:04 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. src/cmd/nm/nm_test.go

    	}
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	exe := filepath.Join(tmpdir, "a.exe")
    	args := []string{"build", "-o", exe}
    	if iscgo {
    		linkmode := "internal"
    		if isexternallinker {
    			linkmode = "external"
    		}
    		args = append(args, "-ldflags", "-linkmode="+linkmode)
    	}
    	args = append(args, src)
    	out, err := testenv.Command(t, testenv.GoToolPath(t), args...).CombinedOutput()
    	if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 20 23:32:34 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  8. src/cmd/link/internal/ld/issue33808_test.go

    func TestIssue33808(t *testing.T) {
    	if runtime.GOOS != "darwin" {
    		return
    	}
    	testenv.MustHaveGoBuild(t)
    	testenv.MustHaveCGO(t)
    	t.Parallel()
    
    	dir := t.TempDir()
    
    	f := gobuild(t, dir, prog, "-ldflags=-linkmode=external")
    	f.Close()
    
    	syms, err := f.Symbols()
    	if err != nil {
    		t.Fatalf("Error reading symbols: %v", err)
    	}
    
    	name := "log.Fatalf"
    	for _, sym := range syms {
    		if strings.Contains(sym.Name, name) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 08 20:03:01 UTC 2021
    - 792 bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/link_external_undef.txt

    # Test case for issue 47993, in which the linker crashes
    # on a bad input instead of issuing an error and exiting.
    
    # This test requires external linking, so use cgo as a proxy 
    [!cgo] skip
    
    ! go build -ldflags='-linkmode=external' .
    ! stderr 'panic'
    stderr '^.*undefined symbol in relocation.*'
    
    -- go.mod --
    
    module issue47993
    
    go 1.16
    
    -- main.go --
    
    package main
    
    type M struct {
    	b bool
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 21 18:44:09 UTC 2023
    - 806 bytes
    - Viewed (0)
  10. src/cmd/go/testdata/script/link_syso_issue33139.txt

    # External linking is not supported on linux/ppc64.
    # See: https://github.com/golang/go/issues/8912
    [GOOS:linux] [GOARCH:ppc64] skip
    
    cc -c -o syso/objTestImpl.syso syso/src/objTestImpl.c
    go build -ldflags='-linkmode=external' ./cmd/main.go
    
    -- go.mod --
    module m
    
    go 1.16
    -- syso/objTest.s --
    #include "textflag.h"
    
    TEXT ·ObjTest(SB), NOSPLIT, $0
    	// We do not actually execute this function in the test above, thus
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 1K bytes
    - Viewed (0)
Back to top