On Tue, Apr 18, 2006 at 11:06:00PM -0700, Andrew Morton wrote:
> Adrian Bunk <[email protected]> wrote:
> >
> > static inline functions mustn't be exported.
> >
>
> Actually, exports of static inlines work OK. The compiler will emit an
> out-of-line copy to satisfy EXPORT_SYMBOL's reference and the module
> namespace is separate from the compiler&linker's namespace.
>
> Of course, things will screw up when we're using the compiler&linker
> namespace (ie: the driver is statically linked).
>...
It even works with statically linked drivers.
It does work unless CONFIG_MODULES=n.
But this doesn't mean it's OK - exporting static code is wrong.
BTW:
It seems Patrick's recently merged patch to let the compiler help us
find such bugs (a1a8feed1743ec8d2af1dafa7c5321679f0a3e4f) isn't working.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]