<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/scripts/mod/modpost.c, branch v2.6.27.56</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>kbuild: Fix modpost segfault</title>
<updated>2010-08-02T17:18:51+00:00</updated>
<author>
<name>Krzysztof Halasa</name>
<email>khc@pm.waw.pl</email>
</author>
<published>2010-06-10T23:08:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4baaa88700f665504702646b908fd7240425bdb5'/>
<id>4baaa88700f665504702646b908fd7240425bdb5</id>
<content type='text'>
commit 1c938663d58b5b2965976a6f54cc51b5d6f691aa upstream.

Alan &lt;alan@clueserver.org&gt; writes:

&gt; program: /home/alan/GitTrees/linux-2.6-mid-ref/scripts/mod/modpost -o
&gt; Module.symvers -S vmlinux.o
&gt;
&gt; Program received signal SIGSEGV, Segmentation fault.

It just hit me.
It's the offset calculation in reloc_location() which overflows:
        return (void *)elf-&gt;hdr + sechdrs[section].sh_offset +
               (r-&gt;r_offset - sechdrs[section].sh_addr);

E.g. for the first rodata r entry:
r-&gt;r_offset &lt; sechdrs[section].sh_addr
and the expression in the parenthesis produces 0xFFFFFFE0 or something
equally wise.

Reported-by: Alan &lt;alan@clueserver.org&gt;
Signed-off-by: Krzysztof Hałasa &lt;khc@pm.waw.pl&gt;
Tested-by: Alan &lt;alan@clueserver.org&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 1c938663d58b5b2965976a6f54cc51b5d6f691aa upstream.

Alan &lt;alan@clueserver.org&gt; writes:

&gt; program: /home/alan/GitTrees/linux-2.6-mid-ref/scripts/mod/modpost -o
&gt; Module.symvers -S vmlinux.o
&gt;
&gt; Program received signal SIGSEGV, Segmentation fault.

It just hit me.
It's the offset calculation in reloc_location() which overflows:
        return (void *)elf-&gt;hdr + sechdrs[section].sh_offset +
               (r-&gt;r_offset - sechdrs[section].sh_addr);

E.g. for the first rodata r entry:
r-&gt;r_offset &lt; sechdrs[section].sh_addr
and the expression in the parenthesis produces 0xFFFFFFE0 or something
equally wise.

Reported-by: Alan &lt;alan@clueserver.org&gt;
Signed-off-by: Krzysztof Hałasa &lt;khc@pm.waw.pl&gt;
Tested-by: Alan &lt;alan@clueserver.org&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: fix Module.markers permission error under cygwin</title>
<updated>2009-05-08T21:54:34+00:00</updated>
<author>
<name>Cedric Hombourger</name>
<email>chombourger@gmail.com</email>
</author>
<published>2009-04-25T07:38:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f3fb397564e99368f0979933c6ee5fe2d3887668'/>
<id>f3fb397564e99368f0979933c6ee5fe2d3887668</id>
<content type='text'>
commit 99e3a1eb3c22bb671c6f3d22d8244bfc9fad8185 upstream.

While building the kernel, we end-up calling modpost with -K and -M
options for the same file (Modules.markers).  This is resulting in
modpost's main function calling read_markers() and then write_markers() on
the same file.

We then have read_markers() mmap'ing the file, and writer_markers()
opening that same file for writing.

The issue is that read_markers() exits without munmap'ing the file and is
as a matter holding a reference on Modules.markers.  When write_markers()
is opening that very same file for writing, we still have a reference on
it and cygwin (Windows?) is then making fopen() fail with EPERM.

Calling release_file() before exiting read_markers() clears that reference
(and memory leak) and fopen() then succeeds.

Tested on both cygwin (1.3.22) and Linux.  Also ran modpost within
valgrind on Linux to make sure that the munmap'ed file was not accessed
after read_markers()

Signed-off-by: Cedric Hombourger &lt;chombourger@gmail.com&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 99e3a1eb3c22bb671c6f3d22d8244bfc9fad8185 upstream.

While building the kernel, we end-up calling modpost with -K and -M
options for the same file (Modules.markers).  This is resulting in
modpost's main function calling read_markers() and then write_markers() on
the same file.

We then have read_markers() mmap'ing the file, and writer_markers()
opening that same file for writing.

The issue is that read_markers() exits without munmap'ing the file and is
as a matter holding a reference on Modules.markers.  When write_markers()
is opening that very same file for writing, we still have a reference on
it and cygwin (Windows?) is then making fopen() fail with EPERM.

Calling release_file() before exiting read_markers() clears that reference
(and memory leak) and fopen() then succeeds.

Tested on both cygwin (1.3.22) and Linux.  Also ran modpost within
valgrind on Linux to make sure that the munmap'ed file was not accessed
after read_markers()

Signed-off-by: Cedric Hombourger &lt;chombourger@gmail.com&gt;
Cc: &lt;stable@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Marker depmod fix core kernel list</title>
<updated>2008-10-06T23:34:19+00:00</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@polymtl.ca</email>
</author>
<published>2008-10-06T13:30:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=87f3b6b6fbcbfa715f0d0db3e7a63e65716a6d4e'/>
<id>87f3b6b6fbcbfa715f0d0db3e7a63e65716a6d4e</id>
<content type='text'>
* Theodore Ts'o (tytso@mit.edu) wrote:
&gt;
&gt; I've been playing with adding some markers into ext4 to see if they
&gt; could be useful in solving some problems along with Systemtap.  It
&gt; appears, though, that as of 2.6.27-rc8, markers defined in code which is
&gt; compiled directly into the kernel (i.e., not as modules) don't show up
&gt; in Module.markers:
&gt;
&gt; kvm_trace_entryexit arch/x86/kvm/kvm-intel  %u %p %u %u %u %u %u %u
&gt; kvm_trace_handler arch/x86/kvm/kvm-intel  %u %p %u %u %u %u %u %u
&gt; kvm_trace_entryexit arch/x86/kvm/kvm-amd  %u %p %u %u %u %u %u %u
&gt; kvm_trace_handler arch/x86/kvm/kvm-amd  %u %p %u %u %u %u %u %u
&gt;
&gt; (Note the lack of any of the kernel_sched_* markers, and the markers I
&gt; added for ext4_* and jbd2_* are missing as wel.)
&gt;
&gt; Systemtap apparently depends on in-kernel trace_mark being recorded in
&gt; Module.markers, and apparently it's been claimed that it used to be
&gt; there.  Is this a bug in systemtap, or in how Module.markers is getting
&gt; built?   And is there a file that contains the equivalent information
&gt; for markers located in non-modules code?

I think the problem comes from "markers: fix duplicate modpost entry"
(commit d35cb360c29956510b2fe1a953bd4968536f7216)

Especially :

  -   add_marker(mod, marker, fmt);
  +   if (!mod-&gt;skip)
  +     add_marker(mod, marker, fmt);
    }
    return;
   fail:

Here is a fix that should take care if this problem.

Thanks for the bug report!

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Tested-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
CC: Greg KH &lt;greg@kroah.com&gt;
CC: David Smith &lt;dsmith@redhat.com&gt;
CC: Roland McGrath &lt;roland@redhat.com&gt;
CC: Sam Ravnborg &lt;sam@ravnborg.org&gt;
CC: Wenji Huang &lt;wenji.huang@oracle.com&gt;
CC: Takashi Nishiie &lt;t-nishiie@np.css.fujitsu.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Theodore Ts'o (tytso@mit.edu) wrote:
&gt;
&gt; I've been playing with adding some markers into ext4 to see if they
&gt; could be useful in solving some problems along with Systemtap.  It
&gt; appears, though, that as of 2.6.27-rc8, markers defined in code which is
&gt; compiled directly into the kernel (i.e., not as modules) don't show up
&gt; in Module.markers:
&gt;
&gt; kvm_trace_entryexit arch/x86/kvm/kvm-intel  %u %p %u %u %u %u %u %u
&gt; kvm_trace_handler arch/x86/kvm/kvm-intel  %u %p %u %u %u %u %u %u
&gt; kvm_trace_entryexit arch/x86/kvm/kvm-amd  %u %p %u %u %u %u %u %u
&gt; kvm_trace_handler arch/x86/kvm/kvm-amd  %u %p %u %u %u %u %u %u
&gt;
&gt; (Note the lack of any of the kernel_sched_* markers, and the markers I
&gt; added for ext4_* and jbd2_* are missing as wel.)
&gt;
&gt; Systemtap apparently depends on in-kernel trace_mark being recorded in
&gt; Module.markers, and apparently it's been claimed that it used to be
&gt; there.  Is this a bug in systemtap, or in how Module.markers is getting
&gt; built?   And is there a file that contains the equivalent information
&gt; for markers located in non-modules code?

I think the problem comes from "markers: fix duplicate modpost entry"
(commit d35cb360c29956510b2fe1a953bd4968536f7216)

Especially :

  -   add_marker(mod, marker, fmt);
  +   if (!mod-&gt;skip)
  +     add_marker(mod, marker, fmt);
    }
    return;
   fail:

Here is a fix that should take care if this problem.

Thanks for the bug report!

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Tested-by: "Theodore Ts'o" &lt;tytso@mit.edu&gt;
CC: Greg KH &lt;greg@kroah.com&gt;
CC: David Smith &lt;dsmith@redhat.com&gt;
CC: Roland McGrath &lt;roland@redhat.com&gt;
CC: Sam Ravnborg &lt;sam@ravnborg.org&gt;
CC: Wenji Huang &lt;wenji.huang@oracle.com&gt;
CC: Takashi Nishiie &lt;t-nishiie@np.css.fujitsu.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts/mod/modpost.c: fix spelling of module and happens</title>
<updated>2008-07-30T16:41:46+00:00</updated>
<author>
<name>Ben Dooks</name>
<email>ben-linux@fluff.org</email>
</author>
<published>2008-07-30T05:33:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=32be1d22327743134974c7b2ec1e2a143b6b6f86'/>
<id>32be1d22327743134974c7b2ec1e2a143b6b6f86</id>
<content type='text'>
Spelling fixes in scripts/mod/modpost.c

Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Spelling fixes in scripts/mod/modpost.c

Signed-off-by: Ben Dooks &lt;ben-linux@fluff.org&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>markers: fix duplicate modpost entry</title>
<updated>2008-07-22T16:59:41+00:00</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>compudj@krystal.dyndns.org</email>
</author>
<published>2008-07-21T21:21:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d35cb360c29956510b2fe1a953bd4968536f7216'/>
<id>d35cb360c29956510b2fe1a953bd4968536f7216</id>
<content type='text'>
When a kernel was rebuilt, the previous Module.markers was not cleared.
It caused markers with different format strings to appear as duplicates
when a markers was changed.  This problem is present since
scripts/mod/modpost.c started to generate Module.markers, commit
b2e3e658b344c6bcfb8fb694100ab2f2b5b2edb0

It therefore applies to 2.6.25, 2.6.26 and linux-next.

I merely merged the patches from Roland, Wenji and Takashi here.

Credits to
Roland McGrath &lt;roland@redhat.com&gt;
Wenji Huang &lt;wenji.huang@oracle.com&gt;
and
Takashi Nishiie &lt;t-nishiie@np.css.fujitsu.com&gt;

for providing the individual fixes.

- Changelog :
  - Integrated Takashi's Makefile modification to clear Module.markers upon
    make clean.

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Wenji Huang &lt;wenji.huang@oracle.com&gt;
Cc: Takashi Nishiie &lt;t-nishiie@np.css.fujitsu.com&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a kernel was rebuilt, the previous Module.markers was not cleared.
It caused markers with different format strings to appear as duplicates
when a markers was changed.  This problem is present since
scripts/mod/modpost.c started to generate Module.markers, commit
b2e3e658b344c6bcfb8fb694100ab2f2b5b2edb0

It therefore applies to 2.6.25, 2.6.26 and linux-next.

I merely merged the patches from Roland, Wenji and Takashi here.

Credits to
Roland McGrath &lt;roland@redhat.com&gt;
Wenji Huang &lt;wenji.huang@oracle.com&gt;
and
Takashi Nishiie &lt;t-nishiie@np.css.fujitsu.com&gt;

for providing the individual fixes.

- Changelog :
  - Integrated Takashi's Makefile modification to clear Module.markers upon
    make clean.

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Wenji Huang &lt;wenji.huang@oracle.com&gt;
Cc: Takashi Nishiie &lt;t-nishiie@np.css.fujitsu.com&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.25.x, 2.6.26.x]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: ignore powerpc specific symbols in modpost</title>
<updated>2008-06-12T14:41:48+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2008-06-12T13:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4d7365d664e79710ac0e782a23443471ddf05bdd'/>
<id>4d7365d664e79710ac0e782a23443471ddf05bdd</id>
<content type='text'>
Kumar Gala &lt;galak@kernel.crashing.org&gt; wrote:
We have a case in powerpc in which we want to link some library
routines with all module objects.  The routines are intended for
handling out-of-line function call register save/restore so having
them as EXPORT_SYMBOL() is counter productive (we do also need to
link the same "library" code into the kernel).

Without this patch a powerpc build would error out and fail
to build modules with the added register save/restore module.

There were two obvious solutions:
1) To link the .o file before the modpost stage
2) To ignore the symbols in modpost

Option 1) was ruled out because we do not have any separate
linking stage for single file modules.

This patch implements option 2 - and do so only for powerpc.

The symbols we ignore are all undefined symbols named:
_restgpr_*, _savegpr_*, _rest32gpr_*, _save32gpr_*

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Kumar Gala &lt;galak@kernel.crashing.org&gt; wrote:
We have a case in powerpc in which we want to link some library
routines with all module objects.  The routines are intended for
handling out-of-line function call register save/restore so having
them as EXPORT_SYMBOL() is counter productive (we do also need to
link the same "library" code into the kernel).

Without this patch a powerpc build would error out and fail
to build modules with the added register save/restore module.

There were two obvious solutions:
1) To link the .o file before the modpost stage
2) To ignore the symbols in modpost

Option 1) was ruled out because we do not have any separate
linking stage for single file modules.

This patch implements option 2 - and do so only for powerpc.

The symbols we ignore are all undefined symbols named:
_restgpr_*, _savegpr_*, _rest32gpr_*, _save32gpr_*

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Kumar Gala &lt;galak@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: disable modpost warnings for linkonce sections</title>
<updated>2008-05-11T08:10:51+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2008-05-08T11:41:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fd1db0a31319bd21c521b197ce17c557556b821b'/>
<id>fd1db0a31319bd21c521b197ce17c557556b821b</id>
<content type='text'>
Disable modpost warnings for linkonce sections

My build gives lots of warnings like

WARNING: sound/core/snd.o (.gnu.linkonce.wi.mpspec_def.h.30779716): unexpected section name.
The (.[number]+) following section name are ld generated and not expected.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example &lt;linux/init.h&gt; contains
section definitions for use in .S files.

But for .linkonce. duplicated sections are actually ok and expected.
So just disable the warning for this case.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Disable modpost warnings for linkonce sections

My build gives lots of warnings like

WARNING: sound/core/snd.o (.gnu.linkonce.wi.mpspec_def.h.30779716): unexpected section name.
The (.[number]+) following section name are ld generated and not expected.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example &lt;linux/init.h&gt; contains
section definitions for use in .S files.

But for .linkonce. duplicated sections are actually ok and expected.
So just disable the warning for this case.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: soften MODULE_LICENSE check</title>
<updated>2008-04-26T19:07:26+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@uranus.ravnborg.org</email>
</author>
<published>2008-04-26T19:07:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2fa365682943866baf85305ef701741fe41b27e0'/>
<id>2fa365682943866baf85305ef701741fe41b27e0</id>
<content type='text'>
Only modules that has other MODULE_* content
shall have the MODULE_LICENSE() tag.

This fixes allmodconfig build on my box.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only modules that has other MODULE_* content
shall have the MODULE_LICENSE() tag.

This fixes allmodconfig build on my box.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: support loading extra symbols in modpost</title>
<updated>2008-04-25T18:35:47+00:00</updated>
<author>
<name>Richard Hacker</name>
<email>lerichi@gmx.net</email>
</author>
<published>2008-02-28T08:40:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2d04b5ae1bf527201a7505c9be7526c43ebd2930'/>
<id>2d04b5ae1bf527201a7505c9be7526c43ebd2930</id>
<content type='text'>
This patch adds a new command line option -E to modpost, expecting a symbol
file as an argument which is read prior to symbol processing. -E can be
supplied multiple times for as many files as is needed.

When building kernel modules that depend on other modules not in the main
kernel tree, modpost complains about undefined symbols:
# make -C /path/to/linux/kernel M=/path/to/my/module
...
Building modules, stage 2.
....
WARNING: "rt_copy_buf" [/home/rich/osc_etl_rtw/osc_kmod.ko] undefined!
...etc

This situation occurs when modpost processes the new module's symbols. When
it finds symbols not exported by the mainline kernel, it issues this warning.

The patch adds a new command line option -e to modpost which expects a symbol
file as an argument. The symbols listed in this file are added to modpost's
symbol tables during startup. -e can be supplied as often as required.

This patch works together with the second patch. It introduces a new make
variable, KBUILD_EXTRA_SYMBOLS, which is used when calling modpost.

Signed-off-by: Richard Hacker &lt;lerichi@gmx.net&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds a new command line option -E to modpost, expecting a symbol
file as an argument which is read prior to symbol processing. -E can be
supplied multiple times for as many files as is needed.

When building kernel modules that depend on other modules not in the main
kernel tree, modpost complains about undefined symbols:
# make -C /path/to/linux/kernel M=/path/to/my/module
...
Building modules, stage 2.
....
WARNING: "rt_copy_buf" [/home/rich/osc_etl_rtw/osc_kmod.ko] undefined!
...etc

This situation occurs when modpost processes the new module's symbols. When
it finds symbols not exported by the mainline kernel, it issues this warning.

The patch adds a new command line option -e to modpost which expects a symbol
file as an argument. The symbols listed in this file are added to modpost's
symbol tables during startup. -e can be supplied as often as required.

This patch works together with the second patch. It introduces a new make
variable, KBUILD_EXTRA_SYMBOLS, which is used when calling modpost.

Signed-off-by: Richard Hacker &lt;lerichi@gmx.net&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kbuild: error out on missing MODULE_LICENSE</title>
<updated>2008-04-25T18:13:30+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@uranus.ravnborg.org</email>
</author>
<published>2008-04-25T18:13:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=eed7d2798ce7b78547106d0c3557a88251b413d0'/>
<id>eed7d2798ce7b78547106d0c3557a88251b413d0</id>
<content type='text'>
Adrian Bunk suggested a build time check for
missing MODULE_LICENSE annotation in modules.
The build time check is fatal as we really
want this fixed for all modules.
In-tree modules should all have been fixed up by now.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Adrian Bunk &lt;bunk@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adrian Bunk suggested a build time check for
missing MODULE_LICENSE annotation in modules.
The build time check is fatal as we really
want this fixed for all modules.
In-tree modules should all have been fixed up by now.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Adrian Bunk &lt;bunk@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
