Bug 12458 - EXPORT_SYMBOL BUG - DEFINED AND EXPORTED IN A FILE1 ( IN DIR1) IS NOT ACCESSIBLE TO A FILE2 (IN DIR2) - DON'T WANT COMPILE TIME DEPENDENCY SOLUTIONS
Summary: EXPORT_SYMBOL BUG - DEFINED AND EXPORTED IN A FILE1 ( IN DIR1) IS NOT ACCESSI...
Status: RESOLVED UNREPRODUCIBLE
Alias: None
Product: Other
Classification: Unclassified
Component: Modules (show other bugs)
Hardware: All Linux
: P1 high
Assignee: other_modules
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-16 03:49 UTC by sucheta
Modified: 2009-03-26 16:16 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.27
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description sucheta 2009-01-16 03:49:22 UTC
Latest working kernel version: 2.6.27
Earliest failing kernel version: 2.6.26
Distribution: SUSE 11
Hardware Environment: 
Software Environment: Linux
Problem Description:

I am facing EXPORT_SYMBOL problem for kernel "2.6.27" kernel.
If I have defined a symbol (say "a") in file "p/dir1/file1" and exported it and try to use in "p/dir2/file2" file, symbol "a" isn't accessible to "file2".

Not acceptable solution :-
Don't want to copy Module.symvers file to "p/dir2" as it introduces a dependency of "file2" on "file1". 

Note:
Run-time dependency is perfectly ok, but don't want compile time dependency.
(as in 2.6.18 kernel, check_version didn't reqd. the symbol to be present in its version table, it will return 1 (success). find_symbol (in 2.6.18) function will help find the symbol present in any other external module, and it will be used. In 2.6.26 onwards, even if find_symbol returns success, but if the external symbol isn't present in module's version table, the symbol will just not be visible to the module. ).

Most probably a bug. If not, what is the solution? (Else insmod of external modules is no longer possible - until and unless all dependent modules are compiled together.) WEIRD???


Steps to reproduce:
(1) write a simple hello world program in file say p/dir1/file1 and export a symbol "a" from it.
(2) write just another program in file say p/dir2/file2 and try using symbol "a" of p/dir1/file1.

It fails and gives kernel panic.
Comment 1 Alan 2009-03-26 16:16:02 UTC
This is for reporting kernel bugs not asking for support with your own problems. The kernel exports module symbols happily between modules and directories

Note You need to log in before you can comment on or make changes to this bug.