Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for BuildModePlugin (0.4 sec)

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

    // in cmd/go, and are documented in 'go help buildmode'.
    type BuildMode uint8
    
    const (
    	BuildModeUnset BuildMode = iota
    	BuildModeExe
    	BuildModePIE
    	BuildModeCArchive
    	BuildModeCShared
    	BuildModeShared
    	BuildModePlugin
    )
    
    // Set implements flag.Value to set the build mode based on the argument
    // to the -buildmode flag.
    func (mode *BuildMode) Set(s string) error {
    	switch s {
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 23 05:14:11 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/target.go

    func (t *Target) IsExe() bool {
    	return t.BuildMode == BuildModeExe
    }
    
    func (t *Target) IsShared() bool {
    	return t.BuildMode == BuildModeShared
    }
    
    func (t *Target) IsPlugin() bool {
    	return t.BuildMode == BuildModePlugin
    }
    
    func (t *Target) IsInternal() bool {
    	return t.LinkMode == LinkInternal
    }
    
    func (t *Target) IsExternal() bool {
    	return t.LinkMode == LinkExternal
    }
    
    func (t *Target) IsPIE() bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 21:14:48 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  3. src/cmd/link/internal/ld/ld.go

    	if !ctxt.DynlinkingGo() {
    		return nil, 0
    	}
    	amd := ctxt.loader.LookupOrCreateSym("runtime.addmoduledata", 0)
    	if ctxt.loader.SymType(amd) == sym.STEXT && ctxt.BuildMode != BuildModePlugin {
    		// we're linking a module containing the runtime -> no need for
    		// an init function
    		return nil, 0
    	}
    	ctxt.loader.SetAttrReachable(amd, true)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 22 16:48:30 UTC 2023
    - 8K bytes
    - Viewed (0)
  4. src/cmd/link/internal/ld/inittask.go

    	case BuildModeExe, BuildModePIE, BuildModeCArchive, BuildModeCShared:
    		// Normally the inittask list will be run on program startup.
    		ctxt.mainInittasks = ctxt.inittaskSym([]string{"main..inittask"}, "go:main.inittasks")
    	case BuildModePlugin:
    		// For plugins, the list will be run on plugin load.
    		ctxt.mainInittasks = ctxt.inittaskSym([]string{fmt.Sprintf("%s..inittask", objabi.PathToPrefix(*flagPluginPath))}, "go:plugin.inittasks")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 30 20:09:45 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  5. src/cmd/link/internal/ld/go.go

    			s := l.LookupOrCreateSym(local, sym.ABIToVersion(abi))
    
    			if l.SymType(s) == sym.SHOSTOBJ {
    				hostObjSyms[s] = struct{}{}
    			}
    
    			switch ctxt.BuildMode {
    			case BuildModeCShared, BuildModeCArchive, BuildModePlugin:
    				if s == l.Lookup("main", 0) {
    					continue
    				}
    			}
    
    			// export overrides import, for openbsd/cgo.
    			// see issue 4878.
    			if l.SymDynimplib(s) != "" {
    				l.SetSymDynimplib(s, "")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 22 16:48:30 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  6. src/cmd/link/internal/ld/lib.go

    func (ctxt *Link) DynlinkingGo() bool {
    	if !ctxt.Loaded {
    		panic("DynlinkingGo called before all symbols loaded")
    	}
    	return ctxt.BuildMode == BuildModeShared || ctxt.linkShared || ctxt.BuildMode == BuildModePlugin || ctxt.canUsePlugins
    }
    
    // CanUsePlugins reports whether a plugins can be used
    func (ctxt *Link) CanUsePlugins() bool {
    	if !ctxt.Loaded {
    		panic("CanUsePlugins called before all symbols loaded")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 18:45:27 UTC 2024
    - 88.6K bytes
    - Viewed (0)
  7. src/cmd/link/internal/x86/asm.go

    	if ctxt.DynlinkingGo() {
    		// We need get_pc_thunk.
    	} else {
    		switch ctxt.BuildMode {
    		case ld.BuildModeCArchive:
    			if !ctxt.IsELF {
    				return
    			}
    		case ld.BuildModePIE, ld.BuildModeCShared, ld.BuildModePlugin:
    			// We need get_pc_thunk.
    		default:
    			return
    		}
    	}
    
    	// Generate little thunks that load the PC of the next instruction into a register.
    	thunks := make([]loader.Sym, 0, 7+len(ctxt.Textp))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 23 05:58:20 UTC 2023
    - 13.6K bytes
    - Viewed (0)
  8. src/cmd/link/internal/ld/symtab.go

    		hashsym := ldr.LookupOrCreateSym("go:link.abihashbytes", 0)
    		abihashgostr.AddAddr(ctxt.Arch, hashsym)
    		abihashgostr.AddUint(ctxt.Arch, uint64(ldr.SymSize(hashsym)))
    	}
    	if ctxt.BuildMode == BuildModePlugin || ctxt.CanUsePlugins() {
    		for _, l := range ctxt.Library {
    			s := ldr.CreateSymForUpdate("go:link.pkghashbytes."+l.Pkg, 0)
    			s.SetType(sym.SRODATA)
    			s.SetSize(int64(len(l.Fingerprint)))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 16:29:40 UTC 2023
    - 29.2K bytes
    - Viewed (0)
  9. src/cmd/link/internal/ld/main.go

    			}
    			pkglistfornote = append(pkglistfornote, pkgpath...)
    			pkglistfornote = append(pkglistfornote, '\n')
    			addlibpath(ctxt, "command line", "command line", file, pkgpath, "", zerofp)
    		}
    	case BuildModePlugin:
    		addlibpath(ctxt, "command line", "command line", flag.Arg(0), *flagPluginPath, "", zerofp)
    	default:
    		addlibpath(ctxt, "command line", "command line", flag.Arg(0), "main", "", zerofp)
    	}
    	bench.Start("loadlib")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  10. src/cmd/link/internal/ld/macho.go

    	//
    	// It would be better to omit the runtime from plugins. (Using
    	// relative PCs in the functab instead of relocations would
    	// also address this.)
    	//
    	// See issue #18190.
    	if ctxt.BuildMode == BuildModePlugin {
    		for _, name := range []string{"_cgo_topofstack", "__cgo_topofstack", "_cgo_panic", "crosscall2"} {
    			// Most of these are data symbols or C
    			// symbols, so they have symbol version 0.
    			ver := 0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:32:53 UTC 2024
    - 43.9K bytes
    - Viewed (0)
Back to top