2.5 fix link with fbcon built-in
Subsystems (2)
PATCH 1/1 2.5 fix link with fbcon built-in
In current bk 2.5, drivers/video/console/fonts.c exports an init_module() symbol when built-in, which prevents the kernel from linking. Here's a quick fix.
Ben.
drivers/video/console/fonts.c Mon Dec 30 11:36:42 2002 renamed from drivers/video/console/fonts.c Fri Nov 29 18:37:57 2002 +2 -0
@@ -130,8 +130,10 @@ return g; } +#ifdef MODULE int init_module(void) { return 0; }; void cleanup_module(void) {}; +#endif EXPORT_SYMBOL(fonts); EXPORT_SYMBOL(find_font);
Signature · 1 line
Benjamin Herrenschmidt <[email protected]>
James Simmons
AppliedQuoted 10 lines
In current bk 2.5,
drivers/video/console/fonts.cexports aninit_module()symbol when built-in, which prevents the kernel from linking. Here's a quick fix.Ben.
drivers/video/console/fonts.c Mon Dec 30 11:36:42 2002 line 139
Quoted 10 lines
drivers/video/console/fonts.c Mon Dec 30 11:36:42 2002 renamed from drivers/video/console/fonts.c Fri Nov 29 18:37:57 2002 +2
-0@@ -130,8 +130,10 @@ return g; } +#ifdef MODULE int init_module(void) { return 0; }; void cleanup_module(void) {}; +#endif EXPORT_SYMBOL(fonts); EXPORT_SYMBOL(find_font);
Applied to BK tree.
Quoted 4 lines · Benjamin Herrenschmidt
In current bk 2.5,
drivers/video/console/fonts.cexports aninit_module()symbol when built-in, which prevents the kernel from linking. Here's a quick fix.
This is not correct.
The functions should either be removed completely (preferred, since they aren't even proper C syntax in the first place - since when do we put semicolons at the end of a function?) or the file should be taught to use proper "module_init()/module_exit()" semantics that work _correctly_ for both modules and built-in.
The patch just hides just _how_ crap this file is, and as such should not be applied. Crap doesn't get better from being hidden.
Linus
Quoted 4 lines
drivers/video/console/fonts.c Mon Dec 30 11:36:42 2002 renamed from drivers/video/console/fonts.c Fri Nov 29 18:37:57 2002 +2
-0+#ifdef MODULE int init_module(void) { return 0; }; void cleanup_module(void) {}; +#endif
Quoted 8 lines · Linus Torvalds
Quoted 4 lines · Benjamin Herrenschmidt
In current bk 2.5,
drivers/video/console/fonts.cexports aninit_module()symbol when built-in, which prevents the kernel from linking. Here's a quick fix.This is not correct.
Quoted 8 lines
The functions should either be removed completely (preferred, since they aren't even proper C syntax in the first place - since when do we put semicolons at the end of a function?) or the file should be taught to use proper "module_init()/module_exit()" semantics that work _correctly_ for both modules and built-in.
The patch just hides just _how_ crap this file is, and as such should not be applied. Crap doesn't get better from being hidden.
Right, though weren't those empty functions just workarounds for a time where new module stuff didn't grok modules without module init/exit ? Is this still the case ? If not, then we should indeed just remove the function completely.
Ben.
Quoted 9 lines
Quoted 9 lines
This is not correct.
The functions should either be removed completely (preferred, since they aren't even proper C syntax in the first place - since when do we put semicolons at the end of a function?) or the file should be taught to use proper "module_init()/module_exit()" semantics that work _correctly_ for both modules and built-in.
Quoted 7 lines
Quoted 2 lines
The patch just hides just _how_ crap this file is, and as such should not be applied. Crap doesn't get better from being hidden.
Right, though weren't those empty functions just workarounds for a time where new module stuff didn't grok modules without module init/exit ? Is this still the case ? If not, then we should indeed just remove the function completely.
Correct. I added them while the module code was in a state of flux so it would get it working. Now that the module code is stable what do we do? I like to see those functions go away.