This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Recognize OpenBSD ELF


The attached patch is pretty obvious, so I committed it.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Recognize
	OpenBSD .note.openbsd.ident sections.

Index: osabi.c
===================================================================
RCS file: /cvs/src/src/gdb/osabi.c,v
retrieving revision 1.26
diff -u -p -r1.26 osabi.c
--- osabi.c 21 Jan 2004 23:07:26 -0000 1.26
+++ osabi.c 22 Jan 2004 21:53:56 -0000
@@ -473,6 +473,15 @@ generic_elf_osabi_sniff_abi_tag_sections
       return;
     }
 
+  /* .note.openbsd.ident notes, used by OpenBSD.  */
+  if (strcmp (name, ".note.openbsd.ident") == 0
+      && check_note (abfd, sect, note, "OpenBSD", 4, NT_OPENBSD_IDENT))
+    {
+      /* There is no need to check the version yet.  */
+      *osabi = GDB_OSABI_OPENBSD_ELF;
+      return;
+    }
+
   /* .note.netbsdcore.procinfo notes, used by NetBSD.  */
   if (strcmp (name, ".note.netbsdcore.procinfo") == 0)
     {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]