Author: andrew
Date: Thu Apr 18 02:20:58 2013
New Revision: 249603
URL: http://svnweb.freebsd.org/changeset/base/249603

Log:
  Fix the value of NT_FREEBSD_TAG to be the same as ABI_NOTRTYPE in lib/csu.
  Add NT_FREEBSD_NOINIT_TAG for the value of CRT_NOINIT_NOTETYPE.
  Check for both of these when detecting a FreeBSD binary in gdb.

Modified:
  head/contrib/binutils/include/elf/common.h
  head/contrib/gdb/gdb/osabi.c

Modified: head/contrib/binutils/include/elf/common.h
==============================================================================
--- head/contrib/binutils/include/elf/common.h  Thu Apr 18 01:30:08 2013        
(r249602)
+++ head/contrib/binutils/include/elf/common.h  Thu Apr 18 02:20:58 2013        
(r249603)
@@ -437,7 +437,8 @@
 
 /* Values for FreeBSD .note.tag notes.  Note name is "FreeBSD".  */
 
-#define NT_FREEBSD_TAG         2
+#define NT_FREEBSD_TAG         1
+#define NT_FREEBSD_NOINIT_TAG  2
 
 /* These three macros disassemble and assemble a symbol table st_info field,
    which contains the symbol binding and symbol type.  The STB_ and STT_

Modified: head/contrib/gdb/gdb/osabi.c
==============================================================================
--- head/contrib/gdb/gdb/osabi.c        Thu Apr 18 01:30:08 2013        
(r249602)
+++ head/contrib/gdb/gdb/osabi.c        Thu Apr 18 02:20:58 2013        
(r249603)
@@ -474,6 +474,12 @@ generic_elf_osabi_sniff_abi_tag_sections
          *osabi = GDB_OSABI_FREEBSD_ELF;
          return;
        }
+      if (check_note (abfd, sect, note, "FreeBSD", 4, NT_FREEBSD_NOINIT_TAG))
+       {
+         /* There is no need to check the version yet.  */
+         *osabi = GDB_OSABI_FREEBSD_ELF;
+         return;
+       }
 
       return;
     }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to