components/gdb/patches/gdb.bfd.elf64-sparc.c.patch
author Rich Burridge <rich.burridge@oracle.com>
Tue, 02 May 2017 17:33:26 -0700
changeset 7964 d9801318ed3d
parent 6420 65948e9e205b
permissions -rw-r--r--
25981468 Build ilmbase and openexr with the GNU compilers

# Solaris-specific ELF information.
# Will contribute upstream if possible.

--- gdb-7.11-orig/bfd/elf64-sparc.c	Tue Feb  9 19:19:39 2016
+++ gdb-7.11/bfd/elf64-sparc.c	Thu Mar 10 13:12:46 2016
@@ -20,12 +20,20 @@
 
 #include "sysdep.h"
 #include "bfd.h"
+#include "bfdlink.h"
 #include "libbfd.h"
 #include "elf-bfd.h"
 #include "elf/sparc.h"
 #include "opcode/sparc.h"
 #include "elfxx-sparc.h"
+#include "elf-vxworks.h"
 
+#include <stddef.h>
+#include <sys/elf.h>
+#include <sys/procfs.h>
+#include <sys/regset.h>
+#include <sys/auxv.h>
+
 /* In case we're on a 32-bit machine, construct a 64-bit "-1" value.  */
 #define MINUS_ONE (~ (bfd_vma) 0)
 
@@ -765,6 +773,40 @@
     return symbol->name;
 }
 
+/* Support for core dump NOTE sections.  */
+static bfd_boolean
+elf64_sparc_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+  /* silence warning about 'unused argument' */
+  if (abfd == NULL)
+    return FALSE;
+
+  switch (note->descsz)
+  {
+    default:
+      return FALSE;
+  }
+
+  return FALSE;
+}
+
+static bfd_boolean
+elf64_sparc_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+  /* silence warning about 'unused argument' */
+  if (abfd == NULL)
+    return FALSE;
+
+  switch (note->descsz)
+  {
+    default:
+      return FALSE;
+  }
+
+  return FALSE;
+}
+
+
 static enum elf_reloc_type_class
 elf64_sparc_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
 			      const asection *rel_sec ATTRIBUTE_UNUSED,
@@ -910,6 +952,11 @@
 #define elf_backend_init_index_section \
   _bfd_elf_init_1_index_section
 
+#define elf_backend_grok_prstatus \
+  elf64_sparc_grok_prstatus
+#define elf_backend_grok_psinfo \
+  elf64_sparc_grok_psinfo
+
 #define elf_backend_can_gc_sections 1
 #define elf_backend_can_refcount 1
 #define elf_backend_want_got_plt 0