From owner-freebsd-advocacy Tue Jun 1 17:14:30 1999 Delivered-To: freebsd-advocacy@freebsd.org Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (Postfix) with ESMTP id 38D6114CC7; Tue, 1 Jun 1999 17:14:27 -0700 (PDT) (envelope-from tlambert@usr09.primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id RAA22361; Tue, 1 Jun 1999 17:14:26 -0700 (MST) Received: from usr09.primenet.com(206.165.6.209) via SMTP by smtp01.primenet.com, id smtpd022258; Tue Jun 1 17:14:22 1999 Received: (from tlambert@localhost) by usr09.primenet.com (8.8.5/8.8.5) id RAA04848; Tue, 1 Jun 1999 17:14:21 -0700 (MST) From: Terry Lambert Message-Id: <199906020014.RAA04848@usr09.primenet.com> Subject: Re: advocacy/11947: kldload doesn't produce a linked file for the module To: steve@FreeBSD.ORG Date: Wed, 2 Jun 1999 00:14:20 +0000 (GMT) Cc: freebsd-advocacy@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG In-Reply-To: <199905302232.PAA93554@freefall.freebsd.org> from "steve@FreeBSD.ORG" at May 30, 99 03:32:03 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-advocacy@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Synopsis: kldload doesn't produce a linked file for the module > > Responsible-Changed-From-To: freebsd-advocacy->freebsd-bugs > Responsible-Changed-By: steve > Responsible-Changed-When: Sun May 30 15:31:28 PDT 1999 > Responsible-Changed-Why: > MIsfiled PR. He knows that. Read the whole thing. He needs symbol offsets for other reasons not having to do with linking. The answer is that there is a symbol table for modules that is maintained in the kernel, which should be used instead. For data symbols, the offsets relative to the module load address are not valid, BTW, using his workaround technique, because of ELF code vs. data segment non-offset in the file for page alignment. ELF images have the overlapping code/text page mapped twice, to reduce the stored image size at the expense of an average of 2k per image at load (the same average for an aligned image). So he must be using the symbol addresses for the text segment only, or mistakenly accessing the residual data mapped in the code page (mistakenly because it would not reflect modifications). The whole point of a two pass in the old LKM code (which I wrote, and for which Jeffrey Hsu provided the original PIC modifications to the x86 GNU compiler and linker) was to know where the relative data offsets would be for uninitialized BSS data. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-advocacy" in the body of the message