From owner-freebsd-stable@FreeBSD.ORG Fri Jul 3 15:05:11 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83E98106564A for ; Fri, 3 Jul 2009 15:05:11 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4700F8FC1A for ; Fri, 3 Jul 2009 15:05:11 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from [IPv6:2001:7b8:3a7:0:2d66:27a4:c4f9:d401] (unknown [IPv6:2001:7b8:3a7:0:2d66:27a4:c4f9:d401]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 913625C59; Fri, 3 Jul 2009 17:05:10 +0200 (CEST) Message-ID: <4A4E1E24.3020303@andric.com> Date: Fri, 03 Jul 2009 17:05:08 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.1pre) Gecko/20090701 Shredder/3.0b3pre MIME-Version: 1.0 To: "Patrick M. Hausen" References: <20090703142528.GA11039@hugo10.ka.punkt.de> <4A4E174A.1050207@andric.com> <20090703144121.GC11039@hugo10.ka.punkt.de> In-Reply-To: <20090703144121.GC11039@hugo10.ka.punkt.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Stable Mailing List Subject: Re: What is /boot/kernel/*.symbols? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2009 15:05:11 -0000 On 2009-07-03 16:41, Patrick M. Hausen wrote: > But I thought, they were in the kernel itself? > > %file /boot/kernel/kernel > /boot/kernel/kernel: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped > > "not stripped" - i.e. "with debug symbols". Wrong? Since when? Well, only the debug symbols have been stripped, not any others. If you look in /usr/src/sys/conf/kern.post.mk, you will see this fragment: ${KERNEL_KO}: ${FULLKERNEL} ${KERNEL_KO}.symbols ${OBJCOPY} --strip-debug --add-gnu-debuglink=${KERNEL_KO}.symbols\ ${FULLKERNEL} ${.TARGET} ${KERNEL_KO}.symbols: ${FULLKERNEL} ${OBJCOPY} --only-keep-debug ${FULLKERNEL} ${.TARGET} E.g. the debug stuff is put into the .symbols files. The kernel itself still contains the function and data names, though: $ objdump -t /boot/kernel/kernel /boot/kernel/kernel: file format elf32-i386-freebsd SYMBOL TABLE: c092de00 l .data 00000000 tmpstk c092de58 l .data 00000000 physfree c092de64 l .data 00000000 proc0uarea [...] If you want to build absolutely without any symbols whatsover, remove the "makeoptions DEBUG=-g" line from your kernel config file.