lkml.org 
[lkml]   [2004]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question on MODULE_VERSION macro
On Mon, Feb 23, 2004 at 02:51:04PM +1100, Rusty Russell wrote:
> In message <20040222232317.GA20083@mars.ravnborg.org> 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.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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