diff mbox

[libgo] Backport for handling of 64 bit symbol tables in gccgo

Message ID 54A2FB49.9050600@linux.vnet.ibm.com
State New
Headers show

Commit Message

Lynn A. Boger Dec. 30, 2014, 7:21 p.m. UTC
Hi,

Please backport the following fix to the gcc 4.9 branch.

2014-12-30  Lynn Boger <laboger@linux.vnet.ibm.com>

     * gcc/go/gofrontend/import-archive.cc:  Recognize 64-bit symbol tables
diff mbox

Patch

Index: gcc/go/gofrontend/import-archive.cc
===================================================================
--- gcc/go/gofrontend/import-archive.cc	(revision 218817)
+++ gcc/go/gofrontend/import-archive.cc	(working copy)
@@ -295,6 +295,15 @@  Archive_file::interpret_header(const Archive_heade
       // This is the symbol table.
       pname->clear();
     }
+  else if (hdr->ar_name[1] == 'S' && hdr->ar_name[2] == 'Y'
+          && hdr->ar_name[3] == 'M' && hdr->ar_name[4] == '6'
+          && hdr->ar_name[5] == '4' && hdr->ar_name[6] == '/'
+          && hdr->ar_name[7] == ' '
+         )
+    {
+      // 64-bit symbol table.
+      pname->clear();
+    }
   else if (hdr->ar_name[1] == '/')
     {
       // This is the extended name table.