Hi,
The following should have been included with the backport for 4.9 in
https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01383.html to allow the
debuginfo to be read for EM_PPC64.
2014-12-30 Lynn Boger <labo...@linux.vnet.ibm.com>
* libgo/go/debug/elf/file.go: Read debug_info for EM_PPC64
Index: libgo/go/debug/elf/file.go
===================================================================
--- libgo/go/debug/elf/file.go (revision 218817)
+++ libgo/go/debug/elf/file.go (working copy)
@@ -681,7 +681,7 @@ func (f *File) DWARF() (*dwarf.Data, error) {
// 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) {
+ if rela != nil && rela.Type == SHT_RELA && (f.Machine == EM_X86_64 ||
f.Machine == EM_AARCH64 || f.Machine == EM_PPC64) {
data, err := rela.Data()
if err != nil {
return nil, err