[PATCH] Recognize OpenBSD ELF
Mark Kettenis
kettenis@chello.nl
Thu Jan 22 21:56:00 GMT 2004
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)
{
More information about the Gdb-patches
mailing list