Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jun 1999 00:14:20 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        steve@FreeBSD.ORG
Cc:        freebsd-advocacy@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: advocacy/11947: kldload doesn't produce a linked file for the module
Message-ID:  <199906020014.RAA04848@usr09.primenet.com>
In-Reply-To: <199905302232.PAA93554@freefall.freebsd.org> from "steve@FreeBSD.ORG" at May 30, 99 03:32:03 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




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