403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.141
Web Server : Apache
System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64
User : sws1073854427 ( 1073854427)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/go/src/cmd/go/testdata/script/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/go/src/cmd/go/testdata/script/cgo_long_cmd.txt
# Issue #66456

[!cgo] skip
[GOOS:windows] skip
[GOOS:plan9] skip

# Generate a file with a very long #cgo LDFLAGS line.
# This used to cause "go build" to fail with "argument list too long".
go generate

# Build with the generated file.
go build

-- go.mod --
module cgolongcmd

go 1.22
-- generate.go --
//go:build ignore

package main

import (
	"fmt"
	"log"
	"os"
	"bytes"
)

func main() {
	var buf bytes.Buffer
	buf.WriteString("package p\n")
	buf.WriteString("// #cgo LDFLAGS:")
	for i := range 10000 {
		fmt.Fprintf(&buf, " -Wl,-rpath,/nonexistentpath/%d", i)
	}
	buf.WriteString("\n")
	buf.WriteString(`import "C"`+"\n")
	if err := os.WriteFile("generated.go", buf.Bytes(), 0o644); err != nil {
		log.Fatal(err)
	}
}
-- gen.go --
package p

//go:generate go run generate.go

Youez - 2016 - github.com/yon3zu
LinuXploit