<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/scripts/mod/modpost.c, branch linux-2.6.22.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.22.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-2.6.22.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2007-06-11T19:52:04+00:00</updated>
<entry>
<title>kbuild: fix sh64 section mismatch problems</title>
<updated>2007-06-11T19:52:04+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2007-06-11T19:52:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2648a53acf16a837e11836203aadb219bd951a1e'/>
<id>urn:sha1:2648a53acf16a837e11836203aadb219bd951a1e</id>
<content type='text'>
There's a special .cranges section that is almost always generated,
with data being moved to the appropriate section by the linker at a later
stage.

To give a bit of background, sh64 has both a native SHmedia instruction
set (32-bit instructions) and SHcompact (which is compatability with
normal SH -- 16-bit, a massively reduced register set, etc.). code ranges
are emitted when we're using the 32-bit ABI, but not the 64-bit one.

It is a special staging section used solely by binutils where code with
different flags get placed (more specifically differing flags for input
and output sections), before being lazily merged by the linker.

The closest I've been able to find to documentation is:
  http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/ld/emultempl/sh64elf.em?rev=1.10&amp;content-type=text/x-cvsweb-markup&amp;cvsroot=src

It's an array of 8-byte Elf32_CRange structure given in
  http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf32-sh64.h?rev=1.4&amp;content-type=text/x-cvsweb-markup&amp;cvsroot=src
that describes for which ISA a range is used.

Silence the warnings by allowing references from .init.text to .cranges.

The following warnings are fixed:

WARNING: init/built-in.o(.cranges+0x0): Section mismatch: reference to .init.text:
WARNING: init/built-in.o(.cranges+0xa): Section mismatch: reference to .init.text:
WARNING: init/built-in.o(.cranges+0x14): Section mismatch: reference to .init.text:
WARNING: init/built-in.o(.cranges+0x1e): Section mismatch: reference to .init.text:
WARNING: init/built-in.o(.cranges+0x28): Section mismatch: reference to .init.text:
WARNING: init/built-in.o(.cranges+0x32): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x50): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x5a): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x64): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0xfa): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x104): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x10e): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x14a): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x154): Section mismatch: reference to .init.text:
WARNING: kernel/built-in.o(.cranges+0x15e): Section mismatch: reference to .init.text:
WARNING: mm/built-in.o(.cranges+0x6e): Section mismatch: reference to .init.text:
WARNING: mm/built-in.o(.cranges+0x78): Section mismatch: reference to .init.text:
WARNING: mm/built-in.o(.cranges+0x82): Section mismatch: reference to .init.text:
WARNING: mm/built-in.o(.cranges+0xaa): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x136): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x140): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x14a): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x168): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x1f4): Section mismatch: reference to .init.text:
WARNING: fs/built-in.o(.cranges+0x1fe): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x302): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x30c): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x316): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x3a2): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x3ac): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x4ce): Section mismatch: reference to .init.text:
WARNING: net/built-in.o(.cranges+0x4d8): Section mismatch: reference to .init.text:

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
Cc: Kaz Kojima &lt;kkojima@rr.iij4u.or.jp&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>Revert "kbuild: make better section mismatch reports on i386, arm and mips"</title>
<updated>2007-05-22T01:41:17+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@woody.linux-foundation.org</email>
</author>
<published>2007-05-22T01:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=efa5bf1dd2cf3cdee0bfe97cfd76ff2296179ae4'/>
<id>urn:sha1:efa5bf1dd2cf3cdee0bfe97cfd76ff2296179ae4</id>
<content type='text'>
This reverts commit f892b7d480eec809a5dfbd6e65742b3f3155e50e, which
totally broke the build on x86 with CONFIG_RELOCATABLE (which, as far as
I can tell, is the only case where it should even matter!) due to a
SIGSEGV in modpost.

Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Atsushi Nemoto &lt;anemo@mba.ocn.ne.jp&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: fix section mismatch warnings</title>
<updated>2007-05-19T07:11:58+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2007-05-17T21:29:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=577a32f620271416d05f852477151fb51c790bc6'/>
<id>urn:sha1:577a32f620271416d05f852477151fb51c790bc6</id>
<content type='text'>
modpost had two cases hardcoded for mm/
Shift over to __init_refok and kill the
hardcoded function names in modpost.

This has the drawback that the functions
will always be kept no matter configuration.
With previous code the function were placed in
init section if configuration allowed it.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>init/main: use __init_refok to fix section mismatch</title>
<updated>2007-05-19T07:11:58+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2007-05-17T18:43:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=92080309df1975729a9f8b45fd56528817e34db8'/>
<id>urn:sha1:92080309df1975729a9f8b45fd56528817e34db8</id>
<content type='text'>
Kill a special case in modpost by introducing the
__init_refok marker.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings</title>
<updated>2007-05-19T07:11:58+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2007-05-17T18:14:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e0d314e6a01bb14d303e35e6f7ba24b17020044'/>
<id>urn:sha1:0e0d314e6a01bb14d303e35e6f7ba24b17020044</id>
<content type='text'>
Throughout the kernel there are a few legitimite references
to init or exit sections. Most of these are covered by the
patterns included in modpost but a few nees special attention.
To avoid hardcoding a lot of function names in modpost introduce
a marker so relevant function/data can be marked.
When modpost see a reference to a init/exit function from
a function/data marked no warning will be issued.

Idea from: Andrew Morton &lt;akpm@linux-foundation.org&gt;

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kbuild: add "Section mismatch" warning whitelist for powerpc</title>
<updated>2007-05-19T07:11:57+00:00</updated>
<author>
<name>Li Yang</name>
<email>leoli@freescale.com</email>
</author>
<published>2007-05-14T10:04:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cd5477911fc9f5cc64678e2b95cdd606c59a11b5'/>
<id>urn:sha1:cd5477911fc9f5cc64678e2b95cdd606c59a11b5</id>
<content type='text'>
This patch fixes the following class of "Section mismatch" warnings when
building powerpc platforms.

WARNING: arch/powerpc/kernel/built-in.o - Section mismatch: reference to .init.data:.got2 from prom_entry (offset 0x0)
WARNING: arch/powerpc/platforms/built-in.o - Section mismatch: reference to .init.text:mpc8313_rdb_probe from .machine.desc after 'mach_mpc8313_rdb' (at offset 0x4)
....

Signed-off-by: Li Yang &lt;leoli@freescale.com&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: make better section mismatch reports on i386, arm and mips</title>
<updated>2007-05-19T07:11:57+00:00</updated>
<author>
<name>Atsushi Nemoto</name>
<email>anemo@mba.ocn.ne.jp</email>
</author>
<published>2007-05-16T16:14:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f892b7d480eec809a5dfbd6e65742b3f3155e50e'/>
<id>urn:sha1:f892b7d480eec809a5dfbd6e65742b3f3155e50e</id>
<content type='text'>
On i386, ARM and MIPS, warn_sec_mismatch() sometimes fails to show
usefull symbol name.  This is because empty 'refsym' due to 0 r_addend
value.  This patch is to adjust r_addend value, consulting with
apply_relocate() routine in kernel code.

Without this patch:
  MODPOST vmlinux
WARNING: init/built-in.o - Section mismatch: reference to .init.text: from .text between 'rest_init' (at offset 0xf4) and 'try_name'
WARNING: mm/built-in.o - Section mismatch: reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x18a39) and 'cache_reap'
WARNING: mm/built-in.o - Section mismatch: reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x18a6b) and 'cache_reap'

With this patch:
  MODPOST vmlinux
WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at offset 0x18a39) and 'cache_reap'
WARNING: mm/built-in.o - Section mismatch: reference to .init.text:set_up_list3s from .text between 'kmem_cache_create' (at offset 0x18a6b) and 'cache_reap'

Now modpost can detect "kernel_init" name (and whitelist it) and show
"set_up_list3s" name.

Signed-off-by: Atsushi Nemoto &lt;anemo@mba.ocn.ne.jp&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>kbuild: make modpost section warnings clearer</title>
<updated>2007-05-19T07:11:57+00:00</updated>
<author>
<name>Russell King</name>
<email>rmk+lkml@arm.linux.org.uk</email>
</author>
<published>2007-05-10T22:03:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2560120997403581dd824e5bd2389c719edcbf12'/>
<id>urn:sha1:2560120997403581dd824e5bd2389c719edcbf12</id>
<content type='text'>
Change modpost section mismatch warnings to be less confusing;
model them on the binutils linker warnings which we all know how
to interpret.

Also, fix the wrong ordering of arguments for the final case -
fromsec and refsymname were reversed.

Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
Acked-by: Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>Allow arch to initialize arch field of the module structure</title>
<updated>2007-05-09T19:30:56+00:00</updated>
<author>
<name>Roman Zippel</name>
<email>zippel@linux-m68k.org</email>
</author>
<published>2007-05-09T09:35:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e61a1c1c4f240cec61300c8f27518c3e47570fd4'/>
<id>urn:sha1:e61a1c1c4f240cec61300c8f27518c3e47570fd4</id>
<content type='text'>
This will later allow an arch to add module specific information via linker
generated tables instead of poking directly in the module object structure.

Signed-off-by: Roman Zippel &lt;zippel@linux-m68k.org&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.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>
</entry>
<entry>
<title>Add white list into modpost.c for memory hotplug code and ia64's machvec section</title>
<updated>2007-05-08T18:14:57+00:00</updated>
<author>
<name>Yasunori Goto</name>
<email>y-goto@jp.fujitsu.com</email>
</author>
<published>2007-05-08T07:23:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=72280ede316911fd5a82ef78d12a6705b1007d36'/>
<id>urn:sha1:72280ede316911fd5a82ef78d12a6705b1007d36</id>
<content type='text'>
This patch is add white list into modpost.c for some functions and
ia64's section to fix section mismatchs.

  sparse_index_alloc() and zone_wait_table_init() calls bootmem allocator
  at boot time, and kmalloc/vmalloc at hotplug time. If config
  memory hotplug is on, there are references of bootmem allocater(init text)
  from them (normal text). This is cause of section mismatch.

  Bootmem is called by many functions and it must be
  used only at boot time. I think __init of them should keep for
  section mismatch check. So, I would like to register sparse_index_alloc()
  and zone_wait_table_init() into white list.

  In addition, ia64's .machvec section is function table of some platform
  dependent code. It is mixture of .init.text and normal text. These
  reference of __init functions are valid too.

Signed-off-by: Yasunori Goto &lt;y-goto@jp.fujitsu.com&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>
</entry>
</feed>
