Due to differences between the master Go library and the Go 1.4 Go
library used by gccgo, I left out a key part of the patch to support
32-bit PPC relocations in the debug/elf package, which is used by cgo.
Matthias reported this as PR 65587.  This patch fixes the problem.
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.

Ian
diff -r 845c56e6408e libgo/go/debug/elf/file.go
--- a/libgo/go/debug/elf/file.go        Wed Mar 25 17:39:23 2015 -0700
+++ b/libgo/go/debug/elf/file.go        Thu Mar 26 10:42:53 2015 -0700
@@ -828,7 +828,7 @@
        // If there's a relocation table for .debug_info, we have to process it
        // now otherwise the data in .debug_info is invalid for x86-64 objects.
        rela := f.Section(".rela.debug_info")
-       if rela != nil && rela.Type == SHT_RELA && (f.Machine == EM_X86_64 || 
f.Machine == EM_AARCH64 || f.Machine == EM_PPC64 || f.Machine == EM_S390) {
+       if rela != nil && rela.Type == SHT_RELA && (f.Machine == EM_X86_64 || 
f.Machine == EM_AARCH64 || f.Machine == EM_PPC || f.Machine == EM_PPC64 || 
f.Machine == EM_S390) {
                data, err := rela.Data()
                if err != nil {
                        return nil, err

Reply via email to