Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for trampolines (0.17 sec)

  1. src/syscall/mksyscall.pl

    		$text .= "\t}\n";
    	}
    	$text .= "\treturn\n";
    	$text .= "}\n\n";
    	if($libc) {
    		if (not exists $trampolines{$funcname}) {
    			$trampolines{$funcname} = 1;
    			# The assembly trampoline that jumps to the libc routine.
    			$text .= "func ${funcname}_trampoline()\n\n";
    			# Tell the linker that funcname can be found in libSystem using varname without the libc_ prefix.
    			my $basename = substr $funcname, 5;
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:15:02 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/data.go

    	if thearch.Trampoline == nil || isTramp {
    		return 0
    	}
    
    	n := uint64(0)
    	relocs := ldr.Relocs(s)
    	for ri := 0; ri < relocs.Count(); ri++ {
    		r := relocs.At(ri)
    		if r.Type().IsDirectCallOrJump() {
    			n++
    		}
    	}
    
    	switch {
    	case ctxt.IsARM():
    		return n * 20 // Trampolines in ARM range from 3 to 5 instructions.
    	case ctxt.IsARM64():
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 12 15:10:50 UTC 2024
    - 100.5K bytes
    - Viewed (0)
  3. src/cmd/link/internal/ppc64/asm.go

    	return ctxt.IsSharedGoLink()
    }
    
    // resolve direct jump relocation r in s, and add trampoline if necessary.
    func trampoline(ctxt *ld.Link, ldr *loader.Loader, ri int, rs, s loader.Sym) {
    
    	// Trampolines are created if the branch offset is too large and the linker cannot insert a call stub to handle it.
    	// For internal linking, trampolines are always created for long calls.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 20:54:08 UTC 2024
    - 63.7K bytes
    - Viewed (0)
  4. src/cmd/link/internal/ld/main.go

    	flagInterpreter   = flag.String("I", "", "use `linker` as ELF dynamic linker")
    	flagCheckLinkname = flag.Bool("checklinkname", true, "check linkname symbol references")
    	FlagDebugTramp    = flag.Int("debugtramp", 0, "debug trampolines")
    	FlagDebugTextSize = flag.Int("debugtextsize", 0, "debug text section max size")
    	flagDebugNosplit  = flag.Bool("debugnosplit", false, "dump nosplit call graph")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:59:50 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  5. src/cmd/link/link_test.go

    	f1()
    }
    
    // Test deferreturn trampolines. See issue #39049.
    func f1() { defer f2() }
    func f2() { panic("XXX") }
    `
    
    func TestTrampoline(t *testing.T) {
    	// Test that trampoline insertion works as expected.
    	// For stress test, we set -debugtramp=2 flag, which sets a very low
    	// threshold for trampoline generation, and essentially all cross-package
    	// calls will use trampolines.
    	buildmodes := []string{"default"}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 20:26:02 UTC 2024
    - 43.5K bytes
    - Viewed (0)
  6. src/cmd/link/internal/riscv64/asm.go

    	pc := ldr.SymValue(s) + int64(r.Off())
    
    	// If the call points to a trampoline, see if we can reach the symbol
    	// directly. This situation can occur when the relocation symbol is
    	// not assigned an address until after the trampolines are generated.
    	if r.Type() == objabi.R_RISCV_JAL_TRAMP {
    		relocs := ldr.Relocs(rs)
    		if relocs.Count() != 1 {
    			ldr.Errorf(s, "trampoline %v has %d relocations", ldr.SymName(rs), relocs.Count())
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 01 08:06:08 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  7. src/cmd/internal/obj/riscv/obj.go

    					// so recheck them.
    					rescan = true
    				}
    			case AJAL:
    				// Linker will handle the intersymbol case and trampolines.
    				if p.To.Target() == nil {
    					if !big {
    						break
    					}
    					// This function is going to be too large for JALs
    					// to reach trampolines. Replace with AUIPC+JALR.
    					jmp := obj.Appendp(p, newprog)
    					jmp.As = AJALR
    					jmp.From = p.From
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 07 03:32:27 UTC 2024
    - 77K bytes
    - Viewed (0)
  8. src/cmd/link/internal/arm64/asm.go

    		}
    		if t >= 1<<27 || t < -1<<27 || ldr.SymValue(rs) == 0 || (*ld.FlagDebugTramp > 1 && (ldr.SymPkg(s) == "" || ldr.SymPkg(s) != ldr.SymPkg(rs))) {
    			// direct call too far, need to insert trampoline.
    			// look up existing trampolines first. if we found one within the range
    			// of direct call, we can reuse it. otherwise create a new one.
    			var tramp loader.Sym
    			for i := 0; ; i++ {
    				oName := ldr.SymName(rs)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 30 20:09:45 UTC 2024
    - 47K bytes
    - Viewed (0)
  9. src/cmd/link/internal/ld/lib.go

    }
    
    type Arch struct {
    	Funcalign  int
    	Maxalign   int
    	Minalign   int
    	Dwarfregsp int
    	Dwarfreglr int
    
    	// Threshold of total text size, used for trampoline insertion. If the total
    	// text size is smaller than TrampLimit, we won't need to insert trampolines.
    	// It is pretty close to the offset range of a direct CALL machine instruction.
    	// We leave some room for extra stuff like PLT stubs.
    	TrampLimit uint64
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 18:45:27 UTC 2024
    - 88.6K bytes
    - Viewed (0)
  10. src/cmd/link/internal/ld/dwarf_test.go

    			t.Errorf("check failed for testcase %s -- wanted:\n%s\ngot:%s\n",
    				tc.tag, tc.expected, foundParams)
    		}
    	}
    }
    func TestIssue54320(t *testing.T) {
    	// Check that when trampolines are used, the DWARF LPT is correctly
    	// emitted in the final binary
    	testenv.MustHaveGoBuild(t)
    
    	mustHaveDWARF(t)
    
    	t.Parallel()
    
    	const prog = `
    package main
    
    import "fmt"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 01:38:11 UTC 2024
    - 48.6K bytes
    - Viewed (0)
Back to top