Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Apr 2013 02:20:58 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r249603 - in head/contrib: binutils/include/elf gdb/gdb
Message-ID:  <201304180220.r3I2KwoE054659@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304180220.r3I2KwoE054659>