aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/oldlink/internal/ld/data.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/oldlink/internal/ld/data.go')
-rw-r--r--src/cmd/oldlink/internal/ld/data.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/oldlink/internal/ld/data.go b/src/cmd/oldlink/internal/ld/data.go
index 3c78896e45..13f412ccd8 100644
--- a/src/cmd/oldlink/internal/ld/data.go
+++ b/src/cmd/oldlink/internal/ld/data.go
@@ -2119,6 +2119,10 @@ func assignAddress(ctxt *Link, sect *sym.Section, n int, s *sym.Symbol, va uint6
funcsize = uint64(s.Size)
}
+ if sect.Align < s.Align {
+ sect.Align = s.Align
+ }
+
// On ppc64x a text section should not be larger than 2^26 bytes due to the size of
// call target offset field in the bl instruction. Splitting into smaller text
// sections smaller than this limit allows the GNU linker to modify the long calls