]> Cypherpunks repositories - gostls13.git/commitdiff
debug/elf: permit another case of SHT_NOBITS section overlap in test
authorIan Lance Taylor <iant@golang.org>
Wed, 14 Sep 2011 22:33:37 +0000 (15:33 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 14 Sep 2011 22:33:37 +0000 (15:33 -0700)
Lets test pass when using gccgo.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5018046

src/pkg/debug/elf/file_test.go

index 451d3d5147f207c06c3ac1deee17ed13d6402ffb..98f2723c86e6e1d3f3108254ed5e6bde2c7700c7 100644 (file)
@@ -227,6 +227,9 @@ func TestNoSectionOverlaps(t *testing.T) {
        }
        for i, si := range f.Sections {
                sih := si.SectionHeader
+               if sih.Type == SHT_NOBITS {
+                       continue
+               }
                for j, sj := range f.Sections {
                        sjh := sj.SectionHeader
                        if i == j || sjh.Type == SHT_NOBITS || sih.Offset == sjh.Offset && sih.Size == 0 {