From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 25 19:45:08 2010 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76EB01065696 for ; Thu, 25 Nov 2010 19:45:08 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3006C8FC24 for ; Thu, 25 Nov 2010 19:45:07 +0000 (UTC) Received: by iwn39 with SMTP id 39so1453213iwn.13 for ; Thu, 25 Nov 2010 11:45:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=okltbIPLTk91FPp8ZRkRvxWnAp6zK56chWGlET9i1cc=; b=K2JhmN3Q5140AzcdoTE7U6HwyhumJDJX18i5kEsdkVbl4L7WbzPPRb29kR5+Gi/zPE VrqII9IkmTdRcrC1jW5wgxSbKbqK76tqV09BFeLvrBxrX/IoCFRi4eoX1Ty0cwu/2cpF CKNSALoMHR43BDwudx13tLio/8QaQECpBr/EI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=AN61jmvXksmrTQqeZYhmBFfAOSl0ZoeZoXb7ZB5ygDltRRos7P/hFAZwALeBWMSEX1 hV745KDKA5ld8BKOMhYMR6bZy6Dt7nMJGkN+TIG/Bwdt7LMoeehkP2LGiHBnI+UTcgNJ 9B3ZzDAQ7YG74/756p/BL2vWKrLjRttkLZPtM= Received: by 10.42.177.68 with SMTP id bh4mr319989icb.503.1290712689120; Thu, 25 Nov 2010 11:18:09 -0800 (PST) Received: from mark-laptop-bsd.mark-home (mail1.sandvine.com [64.7.137.162]) by mx.google.com with ESMTPS id z4sm1094072ibg.19.2010.11.25.11.18.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 25 Nov 2010 11:18:06 -0800 (PST) Date: Thu, 25 Nov 2010 14:17:27 -0500 From: Mark Johnston To: Erik Cederstrand Message-ID: <20101125191727.GB1342@mark-laptop-bsd.mark-home> References: <93FA0AC7-704D-4EB4-A163-FDD8AC915630@cederstrand.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <93FA0AC7-704D-4EB4-A163-FDD8AC915630@cederstrand.dk> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Hackers Subject: Re: Deterministic builds, part 2 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2010 19:45:08 -0000 On Thu, Nov 25, 2010 at 01:08:58PM +0100, Erik Cederstrand wrote: > Kernel modules: > ---------------------- > In the ELF section .gnu-debuglink, there is a link to the corresponding *.ko.symbols file. It seems to be an inode or such rather than a file path since nothing shows up in strings(1). I have commented out "makeoptions DEBUG=-g" in the GENERIC kernel conf file which I am testing now, but I'd like to know what is actually going on. The .gnu_debuglink segment contains the name of the debug symbols file (i.e. not a full path or an inode number). I'm not sure why it doesn't show up with strings(1), but you can see it with a hex editor. When gdb loads an object file with a gnu_debuglink segment, it looks in a few pre-defined locations for the corresponding symbols file. The gdb docs explain it pretty well: http://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html -Mark