linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* gcc 4.1.1 issues with 2.6.17-rc5
@ 2006-05-28  2:55 Con Kolivas
  2006-05-28  5:21 ` Con Kolivas
  0 siblings, 1 reply; 7+ messages in thread
From: Con Kolivas @ 2006-05-28  2:55 UTC (permalink / raw)
  To: linux list

[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]

Funky new warnings on upgrading to gcc 4.1.1

gcc compiled locally with:
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1.1/configure --prefix=/usr --mandir=/usr/share/man 
--infodir=/usr/share/info --enable-shared --enable-threads=posix 
--disable-checking --enable-long-long --enable-__cxa_atexit 
--enable-clocale=gnu --disable-libunwind-exceptions --enable-languages=c,c++ 
--program-suffix=-4.1.1

warnings:
  OBJCOPY arch/i386/boot/vmlinux.bin
WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x0)
WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x4)
WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference 
to .exit.text: from .smp_locks after '' (at offset 0x8)
WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference 
to .exit.text: from .smp_locks after '' (at offset 0xc)
WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference 
to .exit.text: from .smp_locks after '' (at offset 0x10)
  BUILD   arch/i386/boot/bzImage

config attached

-- 
-ck

[-- Attachment #2: config.gz --]
[-- Type: application/x-gzip, Size: 8323 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 4.1.1 issues with 2.6.17-rc5
  2006-05-28  2:55 gcc 4.1.1 issues with 2.6.17-rc5 Con Kolivas
@ 2006-05-28  5:21 ` Con Kolivas
  2006-05-28  5:39   ` Randy.Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: Con Kolivas @ 2006-05-28  5:21 UTC (permalink / raw)
  To: linux-kernel

On Sunday 28 May 2006 12:55, Con Kolivas wrote:
> Funky new warnings on upgrading to gcc 4.1.1
>
> gcc compiled locally with:
> Target: i686-pc-linux-gnu
> Configured with: ../gcc-4.1.1/configure --prefix=/usr
> --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared
> --enable-threads=posix
> --disable-checking --enable-long-long --enable-__cxa_atexit
> --enable-clocale=gnu --disable-libunwind-exceptions
> --enable-languages=c,c++ --program-suffix=-4.1.1
>
> warnings:
>   OBJCOPY arch/i386/boot/vmlinux.bin
> WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference
> to .init.text: from .smp_locks after '' (at offset 0x0)
> WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference
> to .init.text: from .smp_locks after '' (at offset 0x4)
> WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference
> to .exit.text: from .smp_locks after '' (at offset 0x8)
> WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference
> to .exit.text: from .smp_locks after '' (at offset 0xc)
> WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference
> to .exit.text: from .smp_locks after '' (at offset 0x10)
>   BUILD   arch/i386/boot/bzImage

Should also mention:
binutils-2.15.92.0.2-6.2.102mdk

and a missed one:
WARNING: drivers/usb/storage/usb-storage.o - Section mismatch: reference 
to .exit.text: from .smp_locks after '' (at offset 0x40)

-- 
-ck

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 4.1.1 issues with 2.6.17-rc5
  2006-05-28  5:21 ` Con Kolivas
@ 2006-05-28  5:39   ` Randy.Dunlap
  2006-05-28  9:15     ` Bongani Hlope
  2006-05-28 16:32     ` Atsushi Nemoto
  0 siblings, 2 replies; 7+ messages in thread
From: Randy.Dunlap @ 2006-05-28  5:39 UTC (permalink / raw)
  To: Con Kolivas; +Cc: linux-kernel

On Sun, 28 May 2006 15:21:20 +1000 Con Kolivas wrote:

> On Sunday 28 May 2006 12:55, Con Kolivas wrote:
> > Funky new warnings on upgrading to gcc 4.1.1
> >
> > gcc compiled locally with:
> > Target: i686-pc-linux-gnu
> > Configured with: ../gcc-4.1.1/configure --prefix=/usr
> > --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared
> > --enable-threads=posix
> > --disable-checking --enable-long-long --enable-__cxa_atexit
> > --enable-clocale=gnu --disable-libunwind-exceptions
> > --enable-languages=c,c++ --program-suffix=-4.1.1
> >
> > warnings:
> >   OBJCOPY arch/i386/boot/vmlinux.bin
> > WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference
> > to .init.text: from .smp_locks after '' (at offset 0x0)
> > WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference
> > to .init.text: from .smp_locks after '' (at offset 0x4)
> > WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference
> > to .exit.text: from .smp_locks after '' (at offset 0x8)
> > WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference
> > to .exit.text: from .smp_locks after '' (at offset 0xc)
> > WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference
> > to .exit.text: from .smp_locks after '' (at offset 0x10)
> >   BUILD   arch/i386/boot/bzImage
> 
> Should also mention:
> binutils-2.15.92.0.2-6.2.102mdk
> 
> and a missed one:
> WARNING: drivers/usb/storage/usb-storage.o - Section mismatch: reference 
> to .exit.text: from .smp_locks after '' (at offset 0x40)

Yep, Jesper posted that one.
I also see it in ieee1394.o.

So where does the .smp_locks section come from?
Is this just a section checker bug/issue?

---
~Randy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 4.1.1 issues with 2.6.17-rc5
  2006-05-28  5:39   ` Randy.Dunlap
@ 2006-05-28  9:15     ` Bongani Hlope
  2006-05-28 16:32     ` Atsushi Nemoto
  1 sibling, 0 replies; 7+ messages in thread
From: Bongani Hlope @ 2006-05-28  9:15 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Con Kolivas, linux-kernel

On Sunday 28 May 2006 07:39, Randy.Dunlap wrote:
> On Sun, 28 May 2006 15:21:20 +1000 Con Kolivas wrote:
> >
> > Should also mention:
> > binutils-2.15.92.0.2-6.2.102mdk
> >
> > and a missed one:
> > WARNING: drivers/usb/storage/usb-storage.o - Section mismatch: reference
> > to .exit.text: from .smp_locks after '' (at offset 0x40)
>
> Yep, Jesper posted that one.
> I also see it in ieee1394.o.
>
> So where does the .smp_locks section come from?
> Is this just a section checker bug/issue?
>

It's not gcc 4.1.1 only, my system:

Gnu C                  4.0.1
Gnu make               3.80
binutils               2.16.91.0.2
util-linux             2.12q
mount                  2.12q
module-init-tools      3.2-pre8
e2fsprogs              1.38
nfs-utils              1.0.7
Linux C Library        2.3.5
Dynamic linker (ldd)   2.3.5
Procps                 3.2.5
Net-tools              1.60
Console-tools          0.2.3
Sh-utils               5.2.1
udev                   068
Modules Loaded         snd_pcm_oss snd_mixer_oss snd_emu10k1 snd_rawmidi 
snd_ac97_codec snd_ac97_bus snd_pcm snd_seq_device snd_timer snd_page_alloc 
snd_util_mem snd_hwdep snd soundcore tg3 i2c_isa i2c_viapro eth1394 ide_cd 
cdrom ohci1394 ieee1394 loop nls_iso8859_1 nls_cp437 vfat fat tuner bttv 
video_buf firmware_class ir_common compat_ioctl32 v4l2_common btcx_risc 
tveeprom videodev video thermal processor fan button ac ehci_hcd uhci_hcd 
usbcore sd_mod sata_via libata scsi_mod

I get theses

WARNING: drivers/acpi/processor.o - Section mismatch: reference to .init.data: 
from .text.acpi_processor_power_init after 'acpi_processor_power_init' (at 
offset 0x1d)
WARNING: drivers/char/ipmi/ipmi_msghandler.o - Section mismatch: reference 
to .exit.text: from .smp_locks after '' (at offset 0x10)
WARNING: drivers/char/ipmi/ipmi_si.o - Section mismatch: reference 
to .exit.text : from .smp_locks after '' (at offset 0x8)
WARNING: drivers/ieee1394/ieee1394.o - Section mismatch: reference 
to .exit.text: from .smp_locks after '' (at offset 0x10)
WARNING: drivers/input/joystick/db9.o - Section mismatch: reference 
to .init.tex t: from .smp_locks after '' (at offset 0x0)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x0)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x8)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x10)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x18)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x20)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x28)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x30)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x38)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x40)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x48)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x50)
WARNING: drivers/input/joystick/gamecon.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x58)
WARNING: drivers/input/joystick/turbografx.o - Section mismatch: reference 
to .init.text: from .smp_locks after '' (at offset 0x0)
WARNING: drivers/usb/storage/usb-storage.o - Section mismatch: reference 
to .exit.text: from .smp_locks after '' (at offset 0x80)
WARNING: net/802/psnap.o - Section mismatch: reference to .exit.text: 
from .smp_ locks after '' (at offset 0x0)
WARNING: net/bluetooth/rfcomm/rfcomm.o - Section mismatch: reference 
to .exit.text: from .smp_locks after '' (at offset 0x8)
WARNING: net/bluetooth/rfcomm/rfcomm.o - Section mismatch: reference 
to .exit.text: from .smp_locks after '' (at offset 0x10)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 4.1.1 issues with 2.6.17-rc5
  2006-05-28  5:39   ` Randy.Dunlap
  2006-05-28  9:15     ` Bongani Hlope
@ 2006-05-28 16:32     ` Atsushi Nemoto
  2006-05-29  4:52       ` Con Kolivas
  1 sibling, 1 reply; 7+ messages in thread
From: Atsushi Nemoto @ 2006-05-28 16:32 UTC (permalink / raw)
  To: rdunlap; +Cc: kernel, linux-kernel, sam

On Sat, 27 May 2006 22:39:45 -0700, "Randy.Dunlap" <rdunlap@xenotime.net> wrote:
> > and a missed one:
> > WARNING: drivers/usb/storage/usb-storage.o - Section mismatch: reference 
> > to .exit.text: from .smp_locks after '' (at offset 0x40)
> 
> Yep, Jesper posted that one.
> I also see it in ieee1394.o.
> 
> So where does the .smp_locks section come from?
> Is this just a section checker bug/issue?

The .smp_locks section comes from LOCK_PREFIX on x86.  I think the
warnings was not shown previously just because the modpost did not
check SHT_REL sections.

Maybe we should fix the modpost to ignore it, but I'm not sure.  Is it
really safe to ignore?  I'm not a x86 expert ...

---
Atsushi Nemoto

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 4.1.1 issues with 2.6.17-rc5
  2006-05-28 16:32     ` Atsushi Nemoto
@ 2006-05-29  4:52       ` Con Kolivas
  2006-05-29  5:55         ` Randy.Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: Con Kolivas @ 2006-05-29  4:52 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: rdunlap, linux-kernel, sam

On Monday 29 May 2006 02:32, Atsushi Nemoto wrote:
> On Sat, 27 May 2006 22:39:45 -0700, "Randy.Dunlap" <rdunlap@xenotime.net> 
wrote:
> > > and a missed one:
> > > WARNING: drivers/usb/storage/usb-storage.o - Section mismatch:
> > > reference to .exit.text: from .smp_locks after '' (at offset 0x40)
> >
> > Yep, Jesper posted that one.
> > I also see it in ieee1394.o.
> >
> > So where does the .smp_locks section come from?
> > Is this just a section checker bug/issue?
>
> The .smp_locks section comes from LOCK_PREFIX on x86.  I think the
> warnings was not shown previously just because the modpost did not
> check SHT_REL sections.
>
> Maybe we should fix the modpost to ignore it, but I'm not sure.  Is it
> really safe to ignore?  I'm not a x86 expert ...

A "scary but harmless" comment from someone in the know would be nice.

--
-ck

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gcc 4.1.1 issues with 2.6.17-rc5
  2006-05-29  4:52       ` Con Kolivas
@ 2006-05-29  5:55         ` Randy.Dunlap
  0 siblings, 0 replies; 7+ messages in thread
From: Randy.Dunlap @ 2006-05-29  5:55 UTC (permalink / raw)
  To: Con Kolivas, kraxel; +Cc: anemo, linux-kernel, sam

On Mon, 29 May 2006 14:52:25 +1000 Con Kolivas wrote:

> On Monday 29 May 2006 02:32, Atsushi Nemoto wrote:
> > On Sat, 27 May 2006 22:39:45 -0700, "Randy.Dunlap" <rdunlap@xenotime.net> 
> wrote:
> > > > and a missed one:
> > > > WARNING: drivers/usb/storage/usb-storage.o - Section mismatch:
> > > > reference to .exit.text: from .smp_locks after '' (at offset 0x40)
> > >
> > > Yep, Jesper posted that one.
> > > I also see it in ieee1394.o.
> > >
> > > So where does the .smp_locks section come from?
> > > Is this just a section checker bug/issue?
> >
> > The .smp_locks section comes from LOCK_PREFIX on x86.  I think the
> > warnings was not shown previously just because the modpost did not
> > check SHT_REL sections.
> >
> > Maybe we should fix the modpost to ignore it, but I'm not sure.  Is it
> > really safe to ignore?  I'm not a x86 expert ...
> 
> A "scary but harmless" comment from someone in the know would be nice.

Yes, I understand your remark.
I have looked at the twisty maze of alternatives code, but Gerd
(added to To:) is really who needs to reply IMO.

Based on my source code reading, it is just scary but harmless.
alternatives_smp_unlock() and alternatives_smp_lock() are passed
beginning and end addresses of text sections and they ignore
(init/exit) code addresses that are outside of the text code
range.
One comment says:
	/* .text segment, needed to avoid patching init code ;) */
and the code does appear to implement that.

I would make one small change to the code, however.
In alternatives_smp_lock() and alternatives_smp_unlock(), change

		if (*ptr > text_end)
			continue;
to
		if (*ptr >= text_end)
			continue;
because text_end is text_start + text_size, so text_end could be
the beginning of the next section.  However, in practice this
may not matter.

---
~Randy

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-05-29  5:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-28  2:55 gcc 4.1.1 issues with 2.6.17-rc5 Con Kolivas
2006-05-28  5:21 ` Con Kolivas
2006-05-28  5:39   ` Randy.Dunlap
2006-05-28  9:15     ` Bongani Hlope
2006-05-28 16:32     ` Atsushi Nemoto
2006-05-29  4:52       ` Con Kolivas
2006-05-29  5:55         ` Randy.Dunlap

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).