[lkml]   [2004]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Question on MODULE_VERSION macro
On Mon, Feb 23, 2004 at 02:51:04PM +1100, Rusty Russell wrote:
> In message <> you write:
> > The more correct approach is to list the .o files in the
> > .mod file. Then in sumversion find the corresponding .file.o.cmd, and parse
> > up the name of the corresponding source file (listed as the first filename
> > in the deps_ assignment, and pass this filename to grab_file.
> OK, I've implemented that. It doesn't complain about non-C files,
> although the parsing might be sub-optimal.
> See get_source_name() for new code. I also put the explicit depend on
> elfconfig.h in the Makefile.

Took a second look at it.
The reason why you parse the sourcefile, is to locate files included
from the local directory.
But this information is already available in the .module.o.cmd file,
so no reason to parse that information up from the .c file -
and eventually having troubles with .s files.

You can get rid of parse_cpp_line(), include_file(),
and some of the helpers when implementing this algorithm. So all
in all a good simplification.

Note also that in the original implementation you have missed
release_file() in a few places. But when you implement the above
you will hit them.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:01    [W:0.043 / U:46.236 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site