]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/ld: set alignment for the .rel.plt section on 32-bit architectures
authorShenghou Ma <minux@golang.org>
Sat, 7 Feb 2015 19:06:02 +0000 (14:06 -0500)
committerMinux Ma <minux@golang.org>
Fri, 13 Feb 2015 20:09:34 +0000 (20:09 +0000)
Fixes #9802.

Change-Id: I22c52a37bdb23a14cc4615c9519431bb14ca81ca
Reviewed-on: https://go-review.googlesource.com/4170
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/ld/elf.c

index 12ced98107213399618ab107239c324360cf7b36..97ed4bd20da09ef9ee994014d1f7a39d2fd7172e 100644 (file)
@@ -1363,6 +1363,7 @@ asmbelf(vlong symo)
                        sh->type = SHT_REL;
                        sh->flags = SHF_ALLOC;
                        sh->entsize = ELF32RELSIZE;
+                       sh->addralign = 4;
                        sh->link = elfshname(".dynsym")->shnum;
                        shsym(sh, linklookup(ctxt, ".rel.plt", 0));