...
1
2
3
4
5 package objabi
6
7 import (
8 "fmt"
9 "strings"
10
11 "internal/buildcfg"
12 )
13
14 const (
15 ElfRelocOffset = 256
16 MachoRelocOffset = 2048
17 GlobalDictPrefix = ".dict"
18 )
19
20
21
22
23
24 func HeaderString() string {
25 archExtra := ""
26 if k, v := buildcfg.GOGOARCH(); k != "" && v != "" {
27 archExtra = " " + k + "=" + v
28 }
29 return fmt.Sprintf("go object %s %s %s%s X:%s\n",
30 buildcfg.GOOS, buildcfg.GOARCH,
31 buildcfg.Version, archExtra,
32 strings.Join(buildcfg.Experiment.Enabled(), ","))
33 }
34
View as plain text