From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17176 invoked by alias); 9 Apr 2009 19:00:05 -0000 Received: (qmail 17129 invoked by uid 22791); 9 Apr 2009 19:00:03 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from rv-out-0708.google.com (HELO rv-out-0708.google.com) (209.85.198.251) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Apr 2009 18:59:56 +0000 Received: by rv-out-0708.google.com with SMTP id l33so616354rvb.48 for ; Thu, 09 Apr 2009 11:59:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.141.36.10 with SMTP id o10mr1156097rvj.152.1239303594640; Thu, 09 Apr 2009 11:59:54 -0700 (PDT) In-Reply-To: <49DE4219.9020606@vmware.com> References: <49DE4219.9020606@vmware.com> Date: Thu, 09 Apr 2009 20:28:00 -0000 Message-ID: Subject: Re: Kernel symbol table From: Shrinand Javadekar To: Michael Snyder Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-04/txt/msg00094.txt.bz2 Hi Michael, Thanks for the reply. However, there are a couple of problems with looking at vmlinux. 1. When I haven't built the kernel myself, I don't have the vmlinux file. 2. When I am remotely connected to a machine, I don't really have the vmlinux file with me. Hence, rather that getting the info statically from file, it would be great to read it directly from the memory of the target. -Shri On Thu, Apr 9, 2009 at 11:44 AM, Michael Snyder wrote: > Shrinand Javadekar wrote: >> >> Hi All, >> >> I have gdb attached to a running kernel. Even if the kernel was not >> built with symbols, there should be some symbols exported by the >> kernel right? The ones exported by using EXPORT_SYMBOL; e.g. sys_open, >> sys_close, etc. >> >> I believe these symbols are kept in the kernel symbol table. The >> question I have is, how do I access this symbol table? >> >> Also, does the kernel do anything special about where to keep (at what >> address) this symbol table? >> >> Thanks in advance. >> -Shri > > Shri, > > If you build the kernel, the symbol file will be called "vmlinux" > in the top level of your build tree. =C2=A0This is an elf file that gdb > can read. > > You do not want the compressed file called "vmlinuz" (note 'z'). > That file is not elf. > > Cheers, > Michael > > --=20 Discover the 'web' of videos www.videonym.com