On 22 March 2011 02:30, Jeff Epler <[email protected]> wrote:

> Any source file can refer to symbols defined in the same source file
...
> A kernel module can refer to non-static symbols defined in a different
> source file within the same kernel module
...
> A kernel module can refer to symbols defined in a previously-loaded
> module or in the built-in parts of the kernel when it is exported with
> EXPORT_SYMBOL
...
> In all these cases, it's also necessary to have the declaration of the
> function earlier in the source than the use of the function.

My source file (a comp in this case) contains an include for
hostmot2.h, which contains declarations for the functions of interest.

If the comp file is in the hal/components tree it is conveniently
auto-compiled during a make, but can't call any functions from the
hal/drivers/hostmot2 tree unless they have an EXPORT_SYMBOL(_GPL)

If I move the comp file to the hal/drivers/mesa-hostmot2 tree then it
works without the EXPORT_SYMBOL macros. (I think, it was getting very
late by then).

I would appreciate a declaration of opinions about where a comp file
which is a driver for specific Mesa hardware belongs in the source
tree.

I am rather puzzled about what determines which kernel module
particular source files belong to.(your second statement) I had
naively assumed that it was one source file per module. Is this
controlled in the makefile?

-- 
atp
"Torque wrenches are for the obedience of fools and the guidance of wise men"

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to