From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 21 20:15:53 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBD30106564A; Mon, 21 Jun 2010 20:15:53 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8B4C78FC12; Mon, 21 Jun 2010 20:15:53 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 3FA7A46B5B; Mon, 21 Jun 2010 16:15:53 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A69AA8A03C; Mon, 21 Jun 2010 16:15:52 -0400 (EDT) From: John Baldwin To: Andriy Gapon Date: Mon, 21 Jun 2010 16:10:45 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <4C1F798C.7010204@freebsd.org> <201006211143.26459.jhb@freebsd.org> <4C1F8BDD.9010408@freebsd.org> In-Reply-To: <4C1F8BDD.9010408@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201006211610.45811.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 21 Jun 2010 16:15:52 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, Navdeep Parhar , freebsd-amd64@freebsd.org Subject: Re: amd64 kernel modules: mapping sections to addresses 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: Mon, 21 Jun 2010 20:15:53 -0000 On Monday 21 June 2010 11:57:17 am Andriy Gapon wrote: > on 21/06/2010 18:43 John Baldwin said the following: > > np@ has a patch to gdb to fix this for kgdb. I haven't committed it as it > > patched gdb internals and wasn't in a kgdb-specific place, but I'm not sure of > > a better way to fix kgdb. > > Oh, yes, section mapping is done in common gdb code. > Perhaps kld.c shouldn't call build_section_table, but directly call > bfd_map_over_sections with a custom variant of add_to_section_table? > Can you please share the patch? It was deeper level than that, I'd have to dig it up. > Still, what about a small tool, elf(3)-base porgram or objdump+objcopy shell > script, that would set section addresses in amd64 .ko (relocatable object file) > similarly to how they are set in i386 .ko (full-blown DSO)? > Or is this too much useless hassle? No idea. If this worked and just let gdb work automatically that would be a nice fix to just put into the build process. -- John Baldwin