binary.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  1. // Copyright 2016 Google Inc. All rights reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package cc
  15. import (
  16. "path/filepath"
  17. "github.com/google/blueprint"
  18. "android/soong/android"
  19. )
  20. type BinaryLinkerProperties struct {
  21. // compile executable with -static
  22. Static_executable *bool `android:"arch_variant"`
  23. // set the name of the output
  24. Stem *string `android:"arch_variant"`
  25. // append to the name of the output
  26. Suffix *string `android:"arch_variant"`
  27. // if set, add an extra objcopy --prefix-symbols= step
  28. Prefix_symbols *string
  29. // if set, install a symlink to the preferred architecture
  30. Symlink_preferred_arch *bool `android:"arch_variant"`
  31. // install symlinks to the binary. Symlink names will have the suffix and the binary
  32. // extension (if any) appended
  33. Symlinks []string `android:"arch_variant"`
  34. // override the dynamic linker
  35. DynamicLinker string `blueprint:"mutated"`
  36. // Names of modules to be overridden. Listed modules can only be other binaries
  37. // (in Make or Soong).
  38. // This does not completely prevent installation of the overridden binaries, but if both
  39. // binaries would be installed by default (in PRODUCT_PACKAGES) the other binary will be removed
  40. // from PRODUCT_PACKAGES.
  41. Overrides []string
  42. // Inject boringssl hash into the shared library. This is only intended for use by external/boringssl.
  43. Inject_bssl_hash *bool `android:"arch_variant"`
  44. }
  45. func init() {
  46. RegisterBinaryBuildComponents(android.InitRegistrationContext)
  47. }
  48. func RegisterBinaryBuildComponents(ctx android.RegistrationContext) {
  49. ctx.RegisterModuleType("cc_binary", BinaryFactory)
  50. ctx.RegisterModuleType("cc_binary_host", binaryHostFactory)
  51. }
  52. // cc_binary produces a binary that is runnable on a device.
  53. func BinaryFactory() android.Module {
  54. module, _ := NewBinary(android.HostAndDeviceSupported)
  55. return module.Init()
  56. }
  57. // cc_binary_host produces a binary that is runnable on a host.
  58. func binaryHostFactory() android.Module {
  59. module, _ := NewBinary(android.HostSupported)
  60. return module.Init()
  61. }
  62. //
  63. // Executables
  64. //
  65. // binaryDecorator is a decorator containing information for C++ binary modules.
  66. type binaryDecorator struct {
  67. *baseLinker
  68. *baseInstaller
  69. stripper Stripper
  70. Properties BinaryLinkerProperties
  71. toolPath android.OptionalPath
  72. // Location of the linked, unstripped binary
  73. unstrippedOutputFile android.Path
  74. // Names of symlinks to be installed for use in LOCAL_MODULE_SYMLINKS
  75. symlinks []string
  76. // If the module has symlink_preferred_arch set, the name of the symlink to the
  77. // binary for the preferred arch.
  78. preferredArchSymlink string
  79. // Output archive of gcno coverage information
  80. coverageOutputFile android.OptionalPath
  81. // Location of the files that should be copied to dist dir when requested
  82. distFiles android.TaggedDistFiles
  83. // Action command lines to run directly after the binary is installed. For example,
  84. // may be used to symlink runtime dependencies (such as bionic) alongside installation.
  85. postInstallCmds []string
  86. }
  87. var _ linker = (*binaryDecorator)(nil)
  88. // linkerProps returns the list of individual properties objects relevant
  89. // for this binary.
  90. func (binary *binaryDecorator) linkerProps() []interface{} {
  91. return append(binary.baseLinker.linkerProps(),
  92. &binary.Properties,
  93. &binary.stripper.StripProperties)
  94. }
  95. // getStemWithoutSuffix returns the main section of the name to use for the symlink of
  96. // the main output file of this binary module. This may be derived from the module name
  97. // or other property overrides.
  98. // For the full symlink name, the `Suffix` property of a binary module must be appended.
  99. func (binary *binaryDecorator) getStemWithoutSuffix(ctx BaseModuleContext) string {
  100. stem := ctx.baseModuleName()
  101. if String(binary.Properties.Stem) != "" {
  102. stem = String(binary.Properties.Stem)
  103. }
  104. return stem
  105. }
  106. // getStem returns the full name to use for the symlink of the main output file of this binary
  107. // module. This may be derived from the module name and/or other property overrides.
  108. func (binary *binaryDecorator) getStem(ctx BaseModuleContext) string {
  109. return binary.getStemWithoutSuffix(ctx) + String(binary.Properties.Suffix)
  110. }
  111. // linkerDeps augments and returns the given `deps` to contain dependencies on
  112. // modules common to most binaries, such as bionic libraries.
  113. func (binary *binaryDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
  114. deps = binary.baseLinker.linkerDeps(ctx, deps)
  115. if ctx.toolchain().Bionic() {
  116. if !Bool(binary.baseLinker.Properties.Nocrt) {
  117. if binary.static() {
  118. deps.CrtBegin = "crtbegin_static"
  119. } else {
  120. deps.CrtBegin = "crtbegin_dynamic"
  121. }
  122. deps.CrtEnd = "crtend_android"
  123. }
  124. if binary.static() {
  125. if ctx.selectedStl() == "libc++_static" {
  126. deps.StaticLibs = append(deps.StaticLibs, "libm", "libc")
  127. }
  128. // static libraries libcompiler_rt, libc and libc_nomalloc need to be linked with
  129. // --start-group/--end-group along with libgcc. If they are in deps.StaticLibs,
  130. // move them to the beginning of deps.LateStaticLibs
  131. var groupLibs []string
  132. deps.StaticLibs, groupLibs = filterList(deps.StaticLibs,
  133. []string{"libc", "libc_nomalloc", "libcompiler_rt"})
  134. deps.LateStaticLibs = append(groupLibs, deps.LateStaticLibs...)
  135. }
  136. // Embed the linker into host bionic binaries. This is needed to support host bionic,
  137. // as the linux kernel requires that the ELF interpreter referenced by PT_INTERP be
  138. // either an absolute path, or relative from CWD. To work around this, we extract
  139. // the load sections from the runtime linker ELF binary and embed them into each host
  140. // bionic binary, omitting the PT_INTERP declaration. The kernel will treat it as a static
  141. // binary, and then we use a special entry point to fix up the arguments passed by
  142. // the kernel before jumping to the embedded linker.
  143. if ctx.Os() == android.LinuxBionic && !binary.static() {
  144. deps.DynamicLinker = "linker"
  145. deps.LinkerFlagsFile = "host_bionic_linker_flags"
  146. }
  147. }
  148. if !binary.static() && inList("libc", deps.StaticLibs) && !ctx.BazelConversionMode() {
  149. ctx.ModuleErrorf("statically linking libc to dynamic executable, please remove libc\n" +
  150. "from static libs or set static_executable: true")
  151. }
  152. return deps
  153. }
  154. func (binary *binaryDecorator) isDependencyRoot() bool {
  155. // Binaries are always the dependency root.
  156. return true
  157. }
  158. // NewBinary builds and returns a new Module corresponding to a C++ binary.
  159. // Individual module implementations which comprise a C++ binary should call this function,
  160. // set some fields on the result, and then call the Init function.
  161. func NewBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) {
  162. module := newModule(hod, android.MultilibFirst)
  163. binary := &binaryDecorator{
  164. baseLinker: NewBaseLinker(module.sanitize),
  165. baseInstaller: NewBaseInstaller("bin", "", InstallInSystem),
  166. }
  167. module.compiler = NewBaseCompiler()
  168. module.linker = binary
  169. module.installer = binary
  170. // Allow module to be added as member of an sdk/module_exports.
  171. module.sdkMemberTypes = []android.SdkMemberType{
  172. ccBinarySdkMemberType,
  173. }
  174. return module, binary
  175. }
  176. // linkerInit initializes dynamic properties of the linker (such as runpath) based
  177. // on properties of this binary.
  178. func (binary *binaryDecorator) linkerInit(ctx BaseModuleContext) {
  179. binary.baseLinker.linkerInit(ctx)
  180. if !ctx.toolchain().Bionic() {
  181. if ctx.Os() == android.Linux {
  182. // Unless explicitly specified otherwise, host static binaries are built with -static
  183. // if HostStaticBinaries is true for the product configuration.
  184. if binary.Properties.Static_executable == nil && ctx.Config().HostStaticBinaries() {
  185. binary.Properties.Static_executable = BoolPtr(true)
  186. }
  187. } else if !ctx.Fuchsia() {
  188. // Static executables are not supported on Darwin or Windows
  189. binary.Properties.Static_executable = nil
  190. }
  191. }
  192. }
  193. func (binary *binaryDecorator) static() bool {
  194. return Bool(binary.Properties.Static_executable)
  195. }
  196. func (binary *binaryDecorator) staticBinary() bool {
  197. return binary.static()
  198. }
  199. func (binary *binaryDecorator) binary() bool {
  200. return true
  201. }
  202. // linkerFlags returns a Flags object containing linker flags that are defined
  203. // by this binary, or that are implied by attributes of this binary. These flags are
  204. // combined with the given flags.
  205. func (binary *binaryDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
  206. flags = binary.baseLinker.linkerFlags(ctx, flags)
  207. // Passing -pie to clang for Windows binaries causes a warning that -pie is unused.
  208. if ctx.Host() && !ctx.Windows() && !binary.static() {
  209. if !ctx.Config().IsEnvTrue("DISABLE_HOST_PIE") {
  210. flags.Global.LdFlags = append(flags.Global.LdFlags, "-pie")
  211. }
  212. }
  213. // MinGW spits out warnings about -fPIC even for -fpie?!) being ignored because
  214. // all code is position independent, and then those warnings get promoted to
  215. // errors.
  216. if !ctx.Windows() {
  217. flags.Global.CFlags = append(flags.Global.CFlags, "-fPIE")
  218. }
  219. if ctx.toolchain().Bionic() {
  220. if binary.static() {
  221. // Clang driver needs -static to create static executable.
  222. // However, bionic/linker uses -shared to overwrite.
  223. // Linker for x86 targets does not allow coexistance of -static and -shared,
  224. // so we add -static only if -shared is not used.
  225. if !inList("-shared", flags.Local.LdFlags) {
  226. flags.Global.LdFlags = append(flags.Global.LdFlags, "-static")
  227. }
  228. flags.Global.LdFlags = append(flags.Global.LdFlags,
  229. "-nostdlib",
  230. "-Bstatic",
  231. "-Wl,--gc-sections",
  232. )
  233. } else { // not static
  234. if flags.DynamicLinker == "" {
  235. if binary.Properties.DynamicLinker != "" {
  236. flags.DynamicLinker = binary.Properties.DynamicLinker
  237. } else {
  238. switch ctx.Os() {
  239. case android.Android:
  240. if ctx.bootstrap() && !ctx.inRecovery() && !ctx.inRamdisk() && !ctx.inVendorRamdisk() {
  241. flags.DynamicLinker = "/system/bin/bootstrap/linker"
  242. } else {
  243. flags.DynamicLinker = "/system/bin/linker"
  244. }
  245. if flags.Toolchain.Is64Bit() {
  246. flags.DynamicLinker += "64"
  247. }
  248. case android.LinuxBionic:
  249. flags.DynamicLinker = ""
  250. default:
  251. ctx.ModuleErrorf("unknown dynamic linker")
  252. }
  253. }
  254. if ctx.Os() == android.LinuxBionic {
  255. // Use the dlwrap entry point, but keep _start around so
  256. // that it can be used by host_bionic_inject
  257. flags.Global.LdFlags = append(flags.Global.LdFlags,
  258. "-Wl,--entry=__dlwrap__start",
  259. "-Wl,--undefined=_start",
  260. )
  261. }
  262. }
  263. flags.Global.LdFlags = append(flags.Global.LdFlags,
  264. "-pie",
  265. "-nostdlib",
  266. "-Bdynamic",
  267. "-Wl,--gc-sections",
  268. "-Wl,-z,nocopyreloc",
  269. )
  270. }
  271. } else { // not bionic
  272. if binary.static() {
  273. flags.Global.LdFlags = append(flags.Global.LdFlags, "-static")
  274. }
  275. if ctx.Darwin() {
  276. flags.Global.LdFlags = append(flags.Global.LdFlags, "-Wl,-headerpad_max_install_names")
  277. }
  278. }
  279. return flags
  280. }
  281. // link registers actions to link this binary, and sets various fields
  282. // on this binary to reflect information that should be exported up the build
  283. // tree (for example, exported flags and include paths).
  284. func (binary *binaryDecorator) link(ctx ModuleContext,
  285. flags Flags, deps PathDeps, objs Objects) android.Path {
  286. fileName := binary.getStem(ctx) + flags.Toolchain.ExecutableSuffix()
  287. outputFile := android.PathForModuleOut(ctx, fileName)
  288. ret := outputFile
  289. var linkerDeps android.Paths
  290. // Add flags from linker flags file.
  291. if deps.LinkerFlagsFile.Valid() {
  292. flags.Local.LdFlags = append(flags.Local.LdFlags, "$$(cat "+deps.LinkerFlagsFile.String()+")")
  293. linkerDeps = append(linkerDeps, deps.LinkerFlagsFile.Path())
  294. }
  295. if flags.DynamicLinker != "" {
  296. flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,-dynamic-linker,"+flags.DynamicLinker)
  297. } else if ctx.toolchain().Bionic() && !binary.static() {
  298. flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,--no-dynamic-linker")
  299. }
  300. builderFlags := flagsToBuilderFlags(flags)
  301. stripFlags := flagsToStripFlags(flags)
  302. if binary.stripper.NeedsStrip(ctx) {
  303. if ctx.Darwin() {
  304. stripFlags.StripUseGnuStrip = true
  305. }
  306. strippedOutputFile := outputFile
  307. outputFile = android.PathForModuleOut(ctx, "unstripped", fileName)
  308. binary.stripper.StripExecutableOrSharedLib(ctx, outputFile, strippedOutputFile, stripFlags)
  309. }
  310. binary.unstrippedOutputFile = outputFile
  311. if String(binary.Properties.Prefix_symbols) != "" {
  312. afterPrefixSymbols := outputFile
  313. outputFile = android.PathForModuleOut(ctx, "unprefixed", fileName)
  314. transformBinaryPrefixSymbols(ctx, String(binary.Properties.Prefix_symbols), outputFile,
  315. builderFlags, afterPrefixSymbols)
  316. }
  317. outputFile = maybeInjectBoringSSLHash(ctx, outputFile, binary.Properties.Inject_bssl_hash, fileName)
  318. // If use_version_lib is true, make an android::build::GetBuildNumber() function available.
  319. if Bool(binary.baseLinker.Properties.Use_version_lib) {
  320. if ctx.Host() {
  321. versionedOutputFile := outputFile
  322. outputFile = android.PathForModuleOut(ctx, "unversioned", fileName)
  323. binary.injectVersionSymbol(ctx, outputFile, versionedOutputFile)
  324. } else {
  325. // When dist'ing a library or binary that has use_version_lib set, always
  326. // distribute the stamped version, even for the device.
  327. versionedOutputFile := android.PathForModuleOut(ctx, "versioned", fileName)
  328. binary.distFiles = android.MakeDefaultDistFiles(versionedOutputFile)
  329. if binary.stripper.NeedsStrip(ctx) {
  330. out := android.PathForModuleOut(ctx, "versioned-stripped", fileName)
  331. binary.distFiles = android.MakeDefaultDistFiles(out)
  332. binary.stripper.StripExecutableOrSharedLib(ctx, versionedOutputFile, out, stripFlags)
  333. }
  334. binary.injectVersionSymbol(ctx, outputFile, versionedOutputFile)
  335. }
  336. }
  337. var validations android.WritablePaths
  338. // Handle host bionic linker symbols.
  339. if ctx.Os() == android.LinuxBionic && !binary.static() {
  340. verifyFile := android.PathForModuleOut(ctx, "host_bionic_verify.stamp")
  341. if !deps.DynamicLinker.Valid() {
  342. panic("Non-static host bionic modules must have a dynamic linker")
  343. }
  344. binary.verifyHostBionicLinker(ctx, outputFile, deps.DynamicLinker.Path(), verifyFile)
  345. validations = append(validations, verifyFile)
  346. }
  347. var sharedLibs android.Paths
  348. // Ignore shared libs for static executables.
  349. if !binary.static() {
  350. sharedLibs = deps.EarlySharedLibs
  351. sharedLibs = append(sharedLibs, deps.SharedLibs...)
  352. sharedLibs = append(sharedLibs, deps.LateSharedLibs...)
  353. linkerDeps = append(linkerDeps, deps.EarlySharedLibsDeps...)
  354. linkerDeps = append(linkerDeps, deps.SharedLibsDeps...)
  355. linkerDeps = append(linkerDeps, deps.LateSharedLibsDeps...)
  356. }
  357. linkerDeps = append(linkerDeps, objs.tidyFiles...)
  358. linkerDeps = append(linkerDeps, flags.LdFlagsDeps...)
  359. // Register link action.
  360. transformObjToDynamicBinary(ctx, objs.objFiles, sharedLibs, deps.StaticLibs,
  361. deps.LateStaticLibs, deps.WholeStaticLibs, linkerDeps, deps.CrtBegin, deps.CrtEnd, true,
  362. builderFlags, outputFile, nil, validations)
  363. objs.coverageFiles = append(objs.coverageFiles, deps.StaticLibObjs.coverageFiles...)
  364. objs.coverageFiles = append(objs.coverageFiles, deps.WholeStaticLibObjs.coverageFiles...)
  365. binary.coverageOutputFile = transformCoverageFilesToZip(ctx, objs, binary.getStem(ctx))
  366. // Need to determine symlinks early since some targets (ie APEX) need this
  367. // information but will not call 'install'
  368. for _, symlink := range binary.Properties.Symlinks {
  369. binary.symlinks = append(binary.symlinks,
  370. symlink+String(binary.Properties.Suffix)+ctx.toolchain().ExecutableSuffix())
  371. }
  372. if Bool(binary.Properties.Symlink_preferred_arch) {
  373. if String(binary.Properties.Suffix) == "" {
  374. ctx.PropertyErrorf("symlink_preferred_arch", "must also specify suffix")
  375. }
  376. if ctx.TargetPrimary() {
  377. // Install a symlink to the preferred architecture
  378. symlinkName := binary.getStemWithoutSuffix(ctx)
  379. binary.symlinks = append(binary.symlinks, symlinkName)
  380. binary.preferredArchSymlink = symlinkName
  381. }
  382. }
  383. return ret
  384. }
  385. func (binary *binaryDecorator) unstrippedOutputFilePath() android.Path {
  386. return binary.unstrippedOutputFile
  387. }
  388. func (binary *binaryDecorator) symlinkList() []string {
  389. return binary.symlinks
  390. }
  391. func (binary *binaryDecorator) nativeCoverage() bool {
  392. return true
  393. }
  394. func (binary *binaryDecorator) coverageOutputFilePath() android.OptionalPath {
  395. return binary.coverageOutputFile
  396. }
  397. // /system/bin/linker -> /apex/com.android.runtime/bin/linker
  398. func (binary *binaryDecorator) installSymlinkToRuntimeApex(ctx ModuleContext, file android.Path) {
  399. dir := binary.baseInstaller.installDir(ctx)
  400. dirOnDevice := android.InstallPathToOnDevicePath(ctx, dir)
  401. target := "/" + filepath.Join("apex", "com.android.runtime", dir.Base(), file.Base())
  402. ctx.InstallAbsoluteSymlink(dir, file.Base(), target)
  403. binary.postInstallCmds = append(binary.postInstallCmds, makeSymlinkCmd(dirOnDevice, file.Base(), target))
  404. for _, symlink := range binary.symlinks {
  405. ctx.InstallAbsoluteSymlink(dir, symlink, target)
  406. binary.postInstallCmds = append(binary.postInstallCmds, makeSymlinkCmd(dirOnDevice, symlink, target))
  407. }
  408. }
  409. func (binary *binaryDecorator) install(ctx ModuleContext, file android.Path) {
  410. // Bionic binaries (e.g. linker) is installed to the bootstrap subdirectory.
  411. // The original path becomes a symlink to the corresponding file in the
  412. // runtime APEX.
  413. translatedArch := ctx.Target().NativeBridge == android.NativeBridgeEnabled
  414. if InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !ctx.Host() && ctx.directlyInAnyApex() &&
  415. !translatedArch && ctx.apexVariationName() == "" && !ctx.inRamdisk() && !ctx.inRecovery() &&
  416. !ctx.inVendorRamdisk() {
  417. if ctx.Device() && isBionic(ctx.baseModuleName()) {
  418. binary.installSymlinkToRuntimeApex(ctx, file)
  419. }
  420. binary.baseInstaller.subDir = "bootstrap"
  421. }
  422. binary.baseInstaller.install(ctx, file)
  423. var preferredArchSymlinkPath android.OptionalPath
  424. for _, symlink := range binary.symlinks {
  425. installedSymlink := ctx.InstallSymlink(binary.baseInstaller.installDir(ctx), symlink,
  426. binary.baseInstaller.path)
  427. if symlink == binary.preferredArchSymlink {
  428. // If this is the preferred arch symlink, save the installed path for use as the
  429. // tool path.
  430. preferredArchSymlinkPath = android.OptionalPathForPath(installedSymlink)
  431. }
  432. }
  433. if ctx.Os().Class == android.Host {
  434. // If the binary is multilib with a symlink to the preferred architecture, use the
  435. // symlink instead of the binary because that's the more "canonical" name.
  436. if preferredArchSymlinkPath.Valid() {
  437. binary.toolPath = preferredArchSymlinkPath
  438. } else {
  439. binary.toolPath = android.OptionalPathForPath(binary.baseInstaller.path)
  440. }
  441. }
  442. }
  443. func (binary *binaryDecorator) hostToolPath() android.OptionalPath {
  444. return binary.toolPath
  445. }
  446. func init() {
  447. pctx.HostBinToolVariable("verifyHostBionicCmd", "host_bionic_verify")
  448. }
  449. var verifyHostBionic = pctx.AndroidStaticRule("verifyHostBionic",
  450. blueprint.RuleParams{
  451. Command: "$verifyHostBionicCmd -i $in -l $linker && touch $out",
  452. CommandDeps: []string{"$verifyHostBionicCmd"},
  453. }, "linker")
  454. func (binary *binaryDecorator) verifyHostBionicLinker(ctx ModuleContext, in, linker android.Path, out android.WritablePath) {
  455. ctx.Build(pctx, android.BuildParams{
  456. Rule: verifyHostBionic,
  457. Description: "verify host bionic",
  458. Input: in,
  459. Implicit: linker,
  460. Output: out,
  461. Args: map[string]string{
  462. "linker": linker.String(),
  463. },
  464. })
  465. }