From 2568d323f603417c74f3b7030a6108362234d427 Mon Sep 17 00:00:00 2001 From: fanzha02 Date: Wed, 25 Mar 2020 11:11:24 +0800 Subject: [PATCH] cmd/link/internal/arm64: increase the function alignment to 16 On arm64, a function's address is 16 bytes aligned, and the assembler aligns the size of function symbol to 16 bytes, so to keep the consistent, this patch changes the function alignment in the linker to 16 bytes. Change-Id: I4d1e89a56200453b7b586fe3f4656bada7544214 Reviewed-on: https://go-review.googlesource.com/c/go/+/225397 Reviewed-by: eric fang Reviewed-by: Cherry Zhang Run-TryBot: Cherry Zhang TryBot-Result: Gobot Gobot --- src/cmd/link/internal/arm64/l.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/link/internal/arm64/l.go b/src/cmd/link/internal/arm64/l.go index 50b88e479f..5f3530335e 100644 --- a/src/cmd/link/internal/arm64/l.go +++ b/src/cmd/link/internal/arm64/l.go @@ -64,7 +64,7 @@ package arm64 const ( maxAlign = 32 // max data alignment minAlign = 1 // min data alignment - funcAlign = 8 + funcAlign = 16 ) /* Used by ../internal/ld/dwarf.go */ -- 2.50.0