LKML Archive on
help / color / mirror / Atom feed
From: Atsushi Nemoto <>
Subject: Re: Detecting section mismatches in vmlinux
Date: Mon, 26 Feb 2007 00:48:38 +0900 (JST)	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sun, 25 Feb 2007 00:25:27 +0100, Sam Ravnborg <> wrote:
> Attached patch does:
> 1) Do not check vmlinux but check all .o files that is used to create vmlinux
> 2) Teach modpost to skip non-elf files (.a files and empty .o files etc)
> With this change we get proper check of vmlinux (or files used to create vmlinux)

Thanks!  It works fine for me too.

> This gives following errors in a x86_64 defconfig build:
> WARNING: init/built-in.o - Section mismatch: reference to .init.text:init from .text between 'rest_init' (at offset 0xe) and 'run_init_process'

This is because rest_init() (non __init) references 'init' (__init) as
an argument of kernel_thread().  No idea how to avoid this warning...

> WARNING: mm/built-in.o - Section mismatch: reference to from .text between 'set_up_list3s' (at offset 0x1e6fb) and 'slab_get_obj'
> WARNING: mm/built-in.o - Section mismatch: reference to from .text between 'set_up_list3s' (at offset 0x1e71c) and 'slab_get_obj'

This is because set_up_list3s() (non __init) references
initkmem_list3[] (__initdata).  The set_up_list3s() is only used on
early stage so can be __init, but it cause an another mismatch ---
setup_cpu_cache() (non __init) calls __init function.  Some trick
using a function pointer might solve this issue, but I wonder it is a
right thing to do...

Or we need another whitelist for vmlinux?

Atsushi Nemoto

  reply	other threads:[~2007-02-25 15:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-21 15:57 Detecting section mismatches in vmlinux Atsushi Nemoto
2007-02-24 18:53 ` Atsushi Nemoto
2007-02-24 20:07   ` Sam Ravnborg
2007-02-24 23:25   ` Sam Ravnborg
2007-02-25 15:48     ` Atsushi Nemoto [this message]
2007-02-25 20:53       ` [PATCH] x86_64: fix section mismatch warnings Sam Ravnborg
2007-02-27 20:25         ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).