From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753181AbYI1C5U (ORCPT ); Sat, 27 Sep 2008 22:57:20 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752335AbYI1C5M (ORCPT ); Sat, 27 Sep 2008 22:57:12 -0400 Received: from an-out-0708.google.com ([209.85.132.248]:18513 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751062AbYI1C5L (ORCPT ); Sat, 27 Sep 2008 22:57:11 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=Heovj10ViTAvm/ulJjD4b2LXIwHYI1GFAGDJuI1kALVplt08CGypz6L/eYIQ4EqwuD 5NgDmF2JxtYag60jEQyUbdZyU33sExGCbTD92lzV467KFuUzSjqAj4rAPez86fgnLfsK ZBkg9sx7vdsutwCrt1UxTO1FDLDQrWF1ToG04= Message-ID: <4b6fba110809271957t78d7c0c6m97b2b6c1386f7700@mail.gmail.com> Date: Sat, 27 Sep 2008 22:57:10 -0400 From: "Daniel Rosenthal" To: linux-kernel@vger.kernel.org Subject: linux object file containing all kernel symbols and suitable for userspace linking? Cc: jdike@linux.com MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: f3956be49aeaa972 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Is there some simple way to do this? Thanks, Daniel