* sh section mismatches [was Re: 2.6.22-rc6 on Dreamcast (SH4)]
@ 2007-06-28 11:57 Satyam Sharma
2007-06-28 18:39 ` Sam Ravnborg
2007-06-30 13:40 ` Adrian McMenamin
0 siblings, 2 replies; 7+ messages in thread
From: Satyam Sharma @ 2007-06-28 11:57 UTC (permalink / raw)
To: Mike Frysinger; +Cc: linuxsh-dev, Adrian McMenamin, LKML, Sam Ravnborg
Hi,
> On Monday 25 June 2007, Adrian McMenamin wrote:
> > Still getting this:
> >
> > MODPOST vmlinux
> > WARNING: arch/sh/boards/dreamcast/built-in.o(.data+0x0): Section
> > mismatch: reference to .init.text: (between 'mv_dreamcast' and
> > 'systemasic_int')
I had sent a patch for this earlier ... Adrian, did you try (build + boot +
testrun) with it? Does this one go away (and system executes fine)?
[ http://lkml.org/lkml/diff/2007/6/23/116/1 ]
[ This has to do with __init functions calling __initmv functions in a
zillion files in arch/sh/boards/.../setup.c which is problematic when
__initmv is not __init itself (!SH_GENERIC && !SH_UNKNOWN) ]
> > WARNING: drivers/built-in.o(.text+0x168e0): Section mismatch: reference
> > to .init.data: (between 'pvr2fb_check_var' and 'pvr2fb_interrupt')
> > WARNING: drivers/built-in.o(.text+0x1701c): Section mismatch: reference
> > to .init.data: (between 'pvr2fb_pci_probe' and 'read_mem')
> > WARNING: drivers/built-in.o(.text+0x17024): Section mismatch: reference
> > to .init.text: (between 'pvr2fb_pci_probe' and 'read_mem')
> > WARNING: drivers/built-in.o(.data+0x738): Section mismatch: reference
> > to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
> > WARNING: drivers/built-in.o(.data+0x750): Section mismatch: reference
> > to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
drivers/video/pvr2fb.c is a mess with __init, __initdata, __devinit and
__devinitdata (__exit and __devexit variants for good measure) all being
used and referencing each other freely ... I have no idea what function
should actually be what. Sam normally knows about such things,
adding him to Cc: list.
On 6/28/07, Mike Frysinger <vapier@gentoo.org> wrote:
> it means there is code that is not marked as init making references
> function/data that is marked as init ...
These warnings are most likely bogus (still good to get rid of them,
of course).
BTW, in include/asm-sh/machvec_init.h, __initmv is:
__attribute__((__section__(".machvec.init"))) /* .machvec.init */
But from arch/sh/kernel/vmlinux.ld.S the name of the section is:
__machvec_start = .;
.init.machvec : { *(.init.machvec) } /* .init.machvec */
__machvec_end = .;
Am I obtuse, or is there something weird about this?
Satyam
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: sh section mismatches [was Re: 2.6.22-rc6 on Dreamcast (SH4)]
2007-06-28 11:57 sh section mismatches [was Re: 2.6.22-rc6 on Dreamcast (SH4)] Satyam Sharma
@ 2007-06-28 18:39 ` Sam Ravnborg
2007-06-30 13:40 ` Adrian McMenamin
1 sibling, 0 replies; 7+ messages in thread
From: Sam Ravnborg @ 2007-06-28 18:39 UTC (permalink / raw)
To: Satyam Sharma; +Cc: Mike Frysinger, linuxsh-dev, Adrian McMenamin, LKML
On Thu, Jun 28, 2007 at 05:27:55PM +0530, Satyam Sharma wrote:
> Hi,
>
> >On Monday 25 June 2007, Adrian McMenamin wrote:
> >> Still getting this:
> >>
> >> MODPOST vmlinux
> >> WARNING: arch/sh/boards/dreamcast/built-in.o(.data+0x0): Section
> >> mismatch: reference to .init.text: (between 'mv_dreamcast' and
> >> 'systemasic_int')
>
> I had sent a patch for this earlier ... Adrian, did you try (build + boot +
> testrun) with it? Does this one go away (and system executes fine)?
>
> [ http://lkml.org/lkml/diff/2007/6/23/116/1 ]
>
> [ This has to do with __init functions calling __initmv functions in a
> zillion files in arch/sh/boards/.../setup.c which is problematic when
> __initmv is not __init itself (!SH_GENERIC && !SH_UNKNOWN) ]
>
> >> WARNING: drivers/built-in.o(.text+0x168e0): Section mismatch: reference
> >> to .init.data: (between 'pvr2fb_check_var' and 'pvr2fb_interrupt')
> >> WARNING: drivers/built-in.o(.text+0x1701c): Section mismatch: reference
> >> to .init.data: (between 'pvr2fb_pci_probe' and 'read_mem')
> >> WARNING: drivers/built-in.o(.text+0x17024): Section mismatch: reference
> >> to .init.text: (between 'pvr2fb_pci_probe' and 'read_mem')
> >> WARNING: drivers/built-in.o(.data+0x738): Section mismatch: reference
> >> to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
> >> WARNING: drivers/built-in.o(.data+0x750): Section mismatch: reference
> >> to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
>
> drivers/video/pvr2fb.c is a mess with __init, __initdata, __devinit and
> __devinitdata (__exit and __devexit variants for good measure) all being
> used and referencing each other freely ... I have no idea what function
> should actually be what. Sam normally knows about such things,
> adding him to Cc: list.
To a quick glance here.
Everything looked OK except the board_list variable. The board_list variable
contains references to both __init and __exit and modpost has no way
to tell which one is good or bad. So to fix the warning this will generate
the only solution is to teach either modpost or the driver to ignore the
references.
The driver can be teached by renaming the variable to one of the following
patterns:
*driver, *_template, *_sht, *_ops, *_probe, *probe_one, *_console, *_timer
Or we could add *_board to modpost. The latter solutions I would like
to avoid.
Sam
>
> On 6/28/07, Mike Frysinger <vapier@gentoo.org> wrote:
> >it means there is code that is not marked as init making references
> >function/data that is marked as init ...
>
> These warnings are most likely bogus (still good to get rid of them,
> of course).
>
> BTW, in include/asm-sh/machvec_init.h, __initmv is:
>
> __attribute__((__section__(".machvec.init"))) /* .machvec.init */
>
> But from arch/sh/kernel/vmlinux.ld.S the name of the section is:
>
> __machvec_start = .;
> .init.machvec : { *(.init.machvec) } /* .init.machvec */
> __machvec_end = .;
>
> Am I obtuse, or is there something weird about this?
>
> Satyam
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: sh section mismatches [was Re: 2.6.22-rc6 on Dreamcast (SH4)]
2007-06-28 11:57 sh section mismatches [was Re: 2.6.22-rc6 on Dreamcast (SH4)] Satyam Sharma
2007-06-28 18:39 ` Sam Ravnborg
@ 2007-06-30 13:40 ` Adrian McMenamin
2007-06-30 13:58 ` Mike Frysinger
2007-06-30 14:20 ` Satyam Sharma
1 sibling, 2 replies; 7+ messages in thread
From: Adrian McMenamin @ 2007-06-30 13:40 UTC (permalink / raw)
To: Satyam Sharma; +Cc: Mike Frysinger, linuxsh-dev, LKML, Sam Ravnborg
On Thu, 2007-06-28 at 17:27 +0530, Satyam Sharma wrote:
> Hi,
>
> > On Monday 25 June 2007, Adrian McMenamin wrote:
> > > Still getting this:
> > >
> > > MODPOST vmlinux
> > > WARNING: arch/sh/boards/dreamcast/built-in.o(.data+0x0): Section
> > > mismatch: reference to .init.text: (between 'mv_dreamcast' and
> > > 'systemasic_int')
>
> I had sent a patch for this earlier ... Adrian, did you try (build + boot +
> testrun) with it? Does this one go away (and system executes fine)?
>
> [ http://lkml.org/lkml/diff/2007/6/23/116/1 ]
>
> [ This has to do with __init functions calling __initmv functions in a
> zillion files in arch/sh/boards/.../setup.c which is problematic when
> __initmv is not __init itself (!SH_GENERIC && !SH_UNKNOWN) ]
>
> > > WARNING: drivers/built-in.o(.text+0x168e0): Section mismatch: reference
> > > to .init.data: (between 'pvr2fb_check_var' and 'pvr2fb_interrupt')
> > > WARNING: drivers/built-in.o(.text+0x1701c): Section mismatch: reference
> > > to .init.data: (between 'pvr2fb_pci_probe' and 'read_mem')
> > > WARNING: drivers/built-in.o(.text+0x17024): Section mismatch: reference
> > > to .init.text: (between 'pvr2fb_pci_probe' and 'read_mem')
> > > WARNING: drivers/built-in.o(.data+0x738): Section mismatch: reference
> > > to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
> > > WARNING: drivers/built-in.o(.data+0x750): Section mismatch: reference
> > > to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
>
> drivers/video/pvr2fb.c is a mess with __init, __initdata, __devinit and
> __devinitdata (__exit and __devexit variants for good measure) all being
> used and referencing each other freely ... I have no idea what function
> should actually be what. Sam normally knows about such things,
> adding him to Cc: list.
>
Finally got around to applying this patch, but it doesn't fix the
problem...
adrian@bossclass:~/linux-2.6.21$ patch -p1 <section.patch
patching file arch/sh/boards/dreamcast/setup.c
patching file arch/sh/boards/hp6xx/setup.c
patching file arch/sh/boards/landisk/setup.c
patching file arch/sh/boards/mpc1211/setup.c
patching file arch/sh/boards/renesas/hs7751rvoip/setup.c
patching file arch/sh/boards/renesas/r7780rp/setup.c
patching file arch/sh/boards/renesas/rts7751r2d/setup.c
patching file arch/sh/boards/se/7343/setup.c
patching file arch/sh/boards/se/770x/setup.c
patching file arch/sh/boards/se/7722/setup.c
patching file arch/sh/boards/se/7780/setup.c
patching file arch/sh/boards/sh03/setup.c
patching file arch/sh/boards/snapgear/setup.c
patching file arch/sh/boards/superh/microdev/setup.c
adrian@bossclass:~/linux-2.6.21$ make ARCH=sh
CROSS_COMPILE=/home/adrian/buildroot/build_sh4/staging_dir/bin/sh4-linux- modules zImage -j3
SYMLINK include/asm-sh/cpu -> include/asm-sh/cpu-sh4
SYMLINK include/asm-sh/mach -> include/asm-sh/dreamcast
CHK include/linux/version.h
CHK include/linux/utsrelease.h
make[1]: `include/asm-sh/machtypes.h' is up to date.
CALL scripts/checksyscalls.sh
CHK include/linux/compile.h
CC arch/sh/boards/dreamcast/setup.o
LD arch/sh/boards/dreamcast/built-in.o
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
KSYM .tmp_kallsyms1.S
AS .tmp_kallsyms1.o
LD .tmp_vmlinux2
KSYM .tmp_kallsyms2.S
AS .tmp_kallsyms2.o
LD vmlinux
SYSMAP System.map
SYSMAP .tmp_System.map
MODPOST vmlinux
WARNING: drivers/built-in.o(.text+0x168e0): Section mismatch: reference
to .init.data: (between 'pvr2fb_check_var' and 'pvr2fb_interrupt')
WARNING: drivers/built-in.o(.text+0x1701c): Section mismatch: reference
to .init.data: (between 'pvr2fb_pci_probe' and 'read_mem')
WARNING: drivers/built-in.o(.text+0x17024): Section mismatch: reference
to .init.text: (between 'pvr2fb_pci_probe' and 'read_mem')
WARNING: drivers/built-in.o(.data+0x738): Section mismatch: reference
to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
WARNING: drivers/built-in.o(.data+0x750): Section mismatch: reference
to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
Building modules, stage 2.
MODPOST 14 modules
OBJCOPY arch/sh/boot/compressed/vmlinux.bin
GZIP arch/sh/boot/compressed/vmlinux.bin.gz
LD arch/sh/boot/compressed/piggy.o
LD arch/sh/boot/compressed/vmlinux
OBJCOPY arch/sh/boot/zImage
Kernel: arch/sh/boot/zImage is ready
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sh section mismatches [was Re: 2.6.22-rc6 on Dreamcast (SH4)]
2007-06-30 13:40 ` Adrian McMenamin
@ 2007-06-30 13:58 ` Mike Frysinger
2007-06-30 14:03 ` Adrian McMenamin
2007-06-30 14:20 ` Satyam Sharma
1 sibling, 1 reply; 7+ messages in thread
From: Mike Frysinger @ 2007-06-30 13:58 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: Satyam Sharma, linuxsh-dev, LKML, Sam Ravnborg
[-- Attachment #1: Type: text/plain, Size: 2190 bytes --]
On Saturday 30 June 2007, Adrian McMenamin wrote:
> On Thu, 2007-06-28 at 17:27 +0530, Satyam Sharma wrote:
> > Hi,
> >
> > > On Monday 25 June 2007, Adrian McMenamin wrote:
> > > > Still getting this:
> > > >
> > > > MODPOST vmlinux
> > > > WARNING: arch/sh/boards/dreamcast/built-in.o(.data+0x0): Section
> > > > mismatch: reference to .init.text: (between 'mv_dreamcast' and
> > > > 'systemasic_int')
> >
> > I had sent a patch for this earlier ... Adrian, did you try (build + boot
> > + testrun) with it? Does this one go away (and system executes fine)?
> >
> > [ http://lkml.org/lkml/diff/2007/6/23/116/1 ]
> >
> > [ This has to do with __init functions calling __initmv functions in a
> > zillion files in arch/sh/boards/.../setup.c which is problematic when
> > __initmv is not __init itself (!SH_GENERIC && !SH_UNKNOWN) ]
> >
> > > > WARNING: drivers/built-in.o(.text+0x168e0): Section mismatch:
> > > > reference to .init.data: (between 'pvr2fb_check_var' and
> > > > 'pvr2fb_interrupt') WARNING: drivers/built-in.o(.text+0x1701c):
> > > > Section mismatch: reference to .init.data: (between
> > > > 'pvr2fb_pci_probe' and 'read_mem')
> > > > WARNING: drivers/built-in.o(.text+0x17024): Section mismatch:
> > > > reference to .init.text: (between 'pvr2fb_pci_probe' and 'read_mem')
> > > > WARNING: drivers/built-in.o(.data+0x738): Section mismatch: reference
> > > > to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
> > > > WARNING: drivers/built-in.o(.data+0x750): Section mismatch: reference
> > > > to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
> >
> > drivers/video/pvr2fb.c is a mess with __init, __initdata, __devinit and
> > __devinitdata (__exit and __devexit variants for good measure) all being
> > used and referencing each other freely ... I have no idea what function
> > should actually be what. Sam normally knows about such things,
> > adding him to Cc: list.
>
> Finally got around to applying this patch, but it doesn't fix the
> problem...
sure it did ... his patch was to address just the stuff in arch/sh/, not the
pvr video driver, and your output shows that it is working
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sh section mismatches [was Re: 2.6.22-rc6 on Dreamcast (SH4)]
2007-06-30 13:40 ` Adrian McMenamin
2007-06-30 13:58 ` Mike Frysinger
@ 2007-06-30 14:20 ` Satyam Sharma
2007-06-30 14:27 ` Adrian McMenamin
1 sibling, 1 reply; 7+ messages in thread
From: Satyam Sharma @ 2007-06-30 14:20 UTC (permalink / raw)
To: Adrian McMenamin; +Cc: Mike Frysinger, linuxsh-dev, LKML, Sam Ravnborg
Hi,
On 6/30/07, Adrian McMenamin <adrian@newgolddream.dyndns.info> wrote:
> [...]
> WARNING: drivers/built-in.o(.text+0x168e0): Section mismatch: reference
> to .init.data: (between 'pvr2fb_check_var' and 'pvr2fb_interrupt')
> WARNING: drivers/built-in.o(.text+0x1701c): Section mismatch: reference
> to .init.data: (between 'pvr2fb_pci_probe' and 'read_mem')
> WARNING: drivers/built-in.o(.text+0x17024): Section mismatch: reference
> to .init.text: (between 'pvr2fb_pci_probe' and 'read_mem')
> WARNING: drivers/built-in.o(.data+0x738): Section mismatch: reference
> to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
> WARNING: drivers/built-in.o(.data+0x750): Section mismatch: reference
> to .init.text: (between 'board_list' and 'pvr2fb_pci_driver')
Right, as Mike just said, these warnings are the ones from
drivers/video/pvr2fb.c which the patch didn't touch ... that was only
to get rid of the "(between 'mv_dreamcast' and 'systemasic_int')"
warning. But of course, we can't be too sure about the patch till
you can boot and run the system ...
Meanwhile I'll look into Sam's suggestion and try to fix the pvr2fb
warnings too.
Satyam
[ BTW I really wish someone from linux-sh would address that
.machvec.init vs .init.machvec section thing in the earlier mail. ]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sh section mismatches [was Re: 2.6.22-rc6 on Dreamcast (SH4)]
2007-06-30 14:20 ` Satyam Sharma
@ 2007-06-30 14:27 ` Adrian McMenamin
0 siblings, 0 replies; 7+ messages in thread
From: Adrian McMenamin @ 2007-06-30 14:27 UTC (permalink / raw)
To: Satyam Sharma; +Cc: Mike Frysinger, linuxsh-dev, LKML, Sam Ravnborg
On Sat, 2007-06-30 at 19:50 +0530, Satyam Sharma wrote:
> Hi,
> Right, as Mike just said, these warnings are the ones from
> drivers/video/pvr2fb.c which the patch didn't touch ... that was only
> to get rid of the "(between 'mv_dreamcast' and 'systemasic_int')"
> warning. But of course, we can't be too sure about the patch till
> you can boot and run the system ...
Boots and runs fine.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-06-30 14:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-28 11:57 sh section mismatches [was Re: 2.6.22-rc6 on Dreamcast (SH4)] Satyam Sharma
2007-06-28 18:39 ` Sam Ravnborg
2007-06-30 13:40 ` Adrian McMenamin
2007-06-30 13:58 ` Mike Frysinger
2007-06-30 14:03 ` Adrian McMenamin
2007-06-30 14:20 ` Satyam Sharma
2007-06-30 14:27 ` Adrian McMenamin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.