From patchwork Fri Dec 22 22:05:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Baldwin X-Patchwork-Id: 25082 Received: (qmail 82884 invoked by alias); 22 Dec 2017 22:05:47 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 82863 invoked by uid 89); 22 Dec 2017 22:05:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=Hx-languages-length:1370 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Dec 2017 22:05:44 +0000 Received: from ralph.baldwin.cx.com (astound-66-234-202-155.ca.astound.net [66.234.202.155]) by mail.baldwin.cx (Postfix) with ESMTPSA id 6A09510A8BE; Fri, 22 Dec 2017 17:05:42 -0500 (EST) From: John Baldwin To: gdb-patches@sourceware.org, binutils@sourceware.org Subject: [PATCH 1/4] Create psuedo sections for FreeBSD NT_PROCSTAT_(PROC|FILES|VMMAP) notes. Date: Fri, 22 Dec 2017 14:05:10 -0800 Message-Id: <20171222220513.54983-2-jhb@FreeBSD.org> In-Reply-To: <20171222220513.54983-1-jhb@FreeBSD.org> References: <20171222220513.54983-1-jhb@FreeBSD.org> X-IsSubscribed: yes bfd/ChangeLog: * elf.c (elfcore_grok_freebsd_note): Handle NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and NT_FREEBSD_PROCSTAT_VMMAP. --- bfd/ChangeLog | 6 ++++++ bfd/elf.c | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e994da3ed6..6a3f44b23d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2017-12-22 John Baldwin + + * elf.c (elfcore_grok_freebsd_note): Handle + NT_FREEBSD_PROCSTAT_PROC, NT_FREEBSD_PROCSTAT_FILES, and + NT_FREEBSD_PROCSTAT_VMMAP. + 2017-12-19 Alan Modra PR 22626 diff --git a/bfd/elf.c b/bfd/elf.c index fa70a94975..b635ba29b1 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -10014,6 +10014,18 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note) else return TRUE; + case NT_FREEBSD_PROCSTAT_PROC: + return elfcore_make_note_pseudosection (abfd, ".note.freebsdcore.proc", + note); + + case NT_FREEBSD_PROCSTAT_FILES: + return elfcore_make_note_pseudosection (abfd, ".note.freebsdcore.files", + note); + + case NT_FREEBSD_PROCSTAT_VMMAP: + return elfcore_make_note_pseudosection (abfd, ".note.freebsdcore.vmmap", + note); + case NT_FREEBSD_PROCSTAT_AUXV: { asection *sect = bfd_make_section_anyway_with_flags (abfd, ".auxv",