Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Dec 1998 14:04:17 +1030
From:      Greg Lehey <grog@lemis.com>
To:        Doug Rabson <dfr@nlsystems.com>, Peter Wemm <peter@netplex.com.au>
Cc:        Bruce Evans <bde@zeta.org.au>, jonny@jonny.eng.br, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG
Subject:   Re: Use of LKMs (was: cvs commit: src/share/mk bsd.kern.mk src/sys/alpha/conf Makefile.alpha)
Message-ID:  <19981229140417.A32838@freebie.lemis.com>
In-Reply-To: <Pine.BSF.4.01.9812231028570.25052-100000@herring.nlsystems.com>; from Doug Rabson on Wed, Dec 23, 1998 at 10:30:24AM %2B0000
References:  <199812230532.NAA39231@spinner.netplex.com.au> <Pine.BSF.4.01.9812231028570.25052-100000@herring.nlsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, 23 December 1998 at 10:30:24 +0000, Doug Rabson wrote:
> On Wed, 23 Dec 1998, Peter Wemm wrote:
>
>> Greg Lehey wrote:
>>> On Saturday, 19 December 1998 at 23:27:39 +1100, Bruce Evans wrote:
>>>>> #define quoting(Bruce Evans)
>>>>> // 	src/lkm                 ->  src/sys/lkm (like src/sys/modules)
>>>>>
>>>>> Is there a reason to keep the lkm's, now that kld's are working ?
>>>>> (Aren't they ?)
>>>>
>>>> They might still be being used.
>>>
>>> [Somehow I missed the original of this]
>>>
>>> What's the current situation for kld debugging?  I'm using Vinum as an
>>> lkm because I can debug it that way.
>>
>> It works just fine, with one exception..  With LKM's you use a fixed
>> offset to skip the header - 0x20 from memory.  With KLD's you have to get
>> that from the header:
>> # objdump --headers /modules/vinum.ko | more
>> Idx Name          Size      VMA       LMA       File off  Algn
>> [..]
>>   6 .text         0000915c  000051e4  000051e4  000051e4  2**2
>>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>> In this case, it would be 0x51e4 as the symbol offset rather than 0x20.
>>
>> Scriptifying that could be fun though.. :-/
>
> Perhaps an #ifdef DDB extra field in struct linker_file which the ELF
> backend could fill in with the correct offset?

After struggling through the structures, I now understand this
statement.  Yes, I think this would be an *excellent* idea.  Peter?

Greg
--
See complete headers for address, home page and phone numbers
finger grog@lemis.com for PGP public key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981229140417.A32838>