From 9d36ab222d838f0e493653e2f31d77adb15ab9b5 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 12 Oct 2016 14:57:19 +0200 Subject: [PATCH] cmd/link: use HEADR to define FlagTextAddr (cosmetic change) This cosmetic change defines ld.FlagTextAddr using ld.HEADR in the Plan 9 cases, like it is done for other operating systems. Change-Id: Ic929c1c437f25661058682cf3e159f0b16cdc538 Reviewed-on: https://go-review.googlesource.com/30912 Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- src/cmd/link/internal/arm64/obj.go | 2 +- src/cmd/link/internal/x86/obj.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go index b2f1e39e3be..c8d12f2aef1 100644 --- a/src/cmd/link/internal/arm64/obj.go +++ b/src/cmd/link/internal/arm64/obj.go @@ -80,7 +80,7 @@ func archinit(ctxt *ld.Link) { ld.HEADR = 32 if *ld.FlagTextAddr == -1 { - *ld.FlagTextAddr = 4128 + *ld.FlagTextAddr = 4096 + int64(ld.HEADR) } if *ld.FlagDataAddr == -1 { *ld.FlagDataAddr = 0 diff --git a/src/cmd/link/internal/x86/obj.go b/src/cmd/link/internal/x86/obj.go index fe43615f16f..f35114f3b2e 100644 --- a/src/cmd/link/internal/x86/obj.go +++ b/src/cmd/link/internal/x86/obj.go @@ -79,7 +79,7 @@ func archinit(ctxt *ld.Link) { ld.HEADR = 32 if *ld.FlagTextAddr == -1 { - *ld.FlagTextAddr = 4096 + 32 + *ld.FlagTextAddr = 4096 + int64(ld.HEADR) } if *ld.FlagDataAddr == -1 { *ld.FlagDataAddr = 0