aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/internal/ld/dwarf.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/link/internal/ld/dwarf.go')
-rw-r--r--src/cmd/link/internal/ld/dwarf.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/link/internal/ld/dwarf.go b/src/cmd/link/internal/ld/dwarf.go
index 563600d9a2..a96b37a4be 100644
--- a/src/cmd/link/internal/ld/dwarf.go
+++ b/src/cmd/link/internal/ld/dwarf.go
@@ -1946,7 +1946,9 @@ func writepub(ispub func(*DWDie) bool) int64 {
*/
func writearanges() int64 {
sectionstart := Cpos()
- headersize := int(Rnd(4+2+4+1+1, int64(Thearch.Ptrsize))) // don't count unit_length field itself
+ // The first tuple is aligned to a multiple of the size of a single tuple
+ // (twice the size of an address)
+ headersize := int(Rnd(4+2+4+1+1, int64(Thearch.Ptrsize*2))) // don't count unit_length field itself
for compunit := dwroot.child; compunit != nil; compunit = compunit.link {
b := getattr(compunit, DW_AT_low_pc)