From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753245AbYI1DOS (ORCPT ); Sat, 27 Sep 2008 23:14:18 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752335AbYI1DOG (ORCPT ); Sat, 27 Sep 2008 23:14:06 -0400 Received: from relay03.mail-hub.dodo.com.au ([123.2.6.238]:37059 "EHLO relay03.mail-hub.dodo.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752267AbYI1DOF (ORCPT ); Sat, 27 Sep 2008 23:14:05 -0400 From: Grant Coady To: "Daniel Rosenthal" Cc: linux-kernel@vger.kernel.org, jdike@linux.com Subject: Re: linux object file containing all kernel symbols and suitable for userspace linking? Date: Sun, 28 Sep 2008 13:13:52 +1000 Organization: http://bugsplatter.id.au/ Reply-To: Grant Coady Message-ID: <4httd4pt37d715nqfvge2fau7nahbq6u3a@4ax.com> References: <4b6fba110809271957t78d7c0c6m97b2b6c1386f7700@mail.gmail.com> In-Reply-To: <4b6fba110809271957t78d7c0c6m97b2b6c1386f7700@mail.gmail.com> X-Mailer: Forte Agent 2.0/32.652 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 Sep 2008 22:57:10 -0400, "Daniel Rosenthal" wrote: >Is there an object file generated by the kernel build process just >before vmlinuz and arch/x86/boot/bzImage are created that contains all >the requisite kernel symbols to complete compilation? I understand >that such an object file wouldn't make a lot of sense to keep around, >because at the point at which such a file were able to be generated >the compilation process could just be completed instead. If it's not >available is there some easy way to generate it? I am trying to test >some kernel code I wrote, and I wanted to test it by running it in >userspace by linking it to a *.o file with a main() function (just to >test out various API facilities; i.e. unit tests). This is so I can >use the API provided by the kernel without having to rewrite it for >userspace. User-Mode Linux won't work for this because the code in >question relies on some architecture specific features and thread >flags of x86, but I guess the approach would probably similar to what >UML uses. There's a vmlinux.o in top-level directory after a kernel compile, is that what you're after? Grant.