From owner-svn-src-all@FreeBSD.ORG Thu Apr 18 02:20:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8B5B0C31; Thu, 18 Apr 2013 02:20:59 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7DFEB2B4; Thu, 18 Apr 2013 02:20:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3I2Kx31054681; Thu, 18 Apr 2013 02:20:59 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3I2KwoE054659; Thu, 18 Apr 2013 02:20:58 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201304180220.r3I2KwoE054659@svn.freebsd.org> From: Andrew Turner Date: Thu, 18 Apr 2013 02:20:58 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2013 02:20:59 -0000 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; }