Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: "Randy.Dunlap" <rdunlap@xenotime.net>
Cc: scsi <linux-scsi@vger.kernel.org>
Subject: Re: section mismatches (scsi e.g.)
Date: Fri, 14 Apr 2006 18:52:10 +0200	[thread overview]
Message-ID: <20060414165210.GA4053@mars.ravnborg.org> (raw)
In-Reply-To: <20060414092911.71f25ac1.rdunlap@xenotime.net>

On Fri, Apr 14, 2006 at 09:29:11AM -0700, Randy.Dunlap wrote:
> Hi Sam,
> 
> I was looking at these warnings (on 2.6.17-rc1-git8):
> 
> WARNING: drivers/scsi/3w-9xxx.o - Section mismatch: reference to .init.data: from .data between 'twa_driver' (at offset 0x18) and 'twa_error_table'
> WARNING: drivers/scsi/3w-xxxx.o - Section mismatch: reference to .init.data: from .data between 'tw_driver' (at offset 0x18) and 'tw_sense_table'
> WARNING: drivers/scsi/gdth.o - Section mismatch: reference to .init.text:gdth_detect from .data between 'driver_template' (at offset 0x270) and 'async_cache_tab'
> 
> I either don't see a problem or I'm having trouble reading/decoding
> the warning messages.  Could you look at these 3 sometime?

> WARNING: drivers/scsi/3w-9xxx.o
twa_driver contains a reference to twa_pci_tbl which is marked
devinitdata.

Darren Jenkins already pointed this pattern out but somehow I lost
the patch (not applied).
It is here:

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 0b92ddf..81448e5 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -492,7 +492,7 @@ static int strrcmp(const char *s, const 
  *   These functions may often be marked __init and we do not want to
  *   warn here.
  *   the pattern is identified by:
- *   tosec   = .init.text | .exit.text
+ *   tosec   = .init.text | .exit.text | .init.data
  *   fromsec = .data
  *   atsym = *_driver, *_ops, *_probe, *probe_one
  **/
@@ -522,7 +522,8 @@ static int secref_whitelist(const char *
 
 	/* Check for pattern 2 */
 	if ((strcmp(tosec, ".init.text") != 0) &&
-	    (strcmp(tosec, ".exit.text") != 0))
+	    (strcmp(tosec, ".exit.text") != 0) &&
+	    (strcmp(tosec, ".init.data") != 0))
 		f2 = 0;
 	if (strcmp(fromsec, ".data") != 0)
 		f2 = 0;

> WARNING: drivers/scsi/3w-xxxx.o
Same issue as above.

> WARNING: drivers/scsi/gdth.o 
>From modpost.c:
* Pattern 2:
*   Many drivers utilise a *_driver container with references to
*   add, remove, probe functions etc.
*   These functions may often be marked __init and we do not want to
*   warn here.
*   the pattern is identified by:
*   tosec   = .init.text | .exit.text
*   fromsec = .data
*   atsym = *_driver, *_ops, *_probe, *probe_one
**/

Shall we include *_template in this list?
The most common name seems to be the ambigous driver_template.
Some scsi drievers has been a bit more specific and used
<driver>_template.
In total 76 drivers.

16 drivers uses: *_sht for their scsi_host_template variables.
And one uses NCR_Q720_tpnt.

I will push the 'lost' patch later today.

	Sam
> 
> Must have CONFIG_HOTPLUG=n ...
> 
> ---
> ~Randy

  parent reply	other threads:[~2006-04-14 16:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-14 16:29 section mismatches (scsi e.g.) Randy.Dunlap
2006-04-14 16:50 ` James Bottomley
2006-04-14 16:53   ` Sam Ravnborg
2006-04-14 16:52 ` Sam Ravnborg [this message]
2006-04-14 18:27   ` Randy.Dunlap
2006-04-14 19:25   ` Randy.Dunlap
2006-04-14 21:21     ` Sam Ravnborg

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20060414165210.GA4053@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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