Re: 2.6.17-mm2

Sam Ravnborg
2006-06-25T21:22:16Z

On Sun, Jun 25, 2006 at 11:40:51AM -0700, Andrew Morton wrote:
> >
> > > IOW, any reference from __ksymtab, __ksymtab_gpl or __ksymtab_gpl_future
> > > into __init or __initdata should be a hard error.
> > We could let modpost error out. Then the module does not get build but
> > we detect it a bit later than optimal.
> >
>
> Well, it doesn't have anything to do with modules per-se. When vmlinux is
> post-processed we want to error out if vmlinux is exporting any
> __init/__initdata symbols to modules.

modpost has evolved over time and when I get the time I will refactor
kbuild so we always call modpost in the final steps of the kernel build
independent on module support or not. And then is makes perfect sense
to have the check for exported symbols from illegal sections located
there.
In other words current modpost will be used also when
executing "make vmlinux". That impose a few tricky things and I have
posponed it for now. Implementing the suggested check should be possible
and will try to look at that sooner.

Sam