* 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' @ 2008-05-10 20:18 Mikael Pettersson 2008-05-10 20:23 ` Rafael J. Wysocki 2008-05-10 20:25 ` H. Peter Anvin 0 siblings, 2 replies; 16+ messages in thread From: Mikael Pettersson @ 2008-05-10 20:18 UTC (permalink / raw) To: tglx, mingo, hpa; +Cc: linux-kernel, sam Building kernel 2.6.26-rc1 on FC6/i386 causes: ld -m elf_i386 -T arch/x86/kernel/acpi/realmode/wakeup.lds arch/x86/kernel/acpi/realmode/wakeup.o arch/x86/kernel/acpi/realmode/wakemain.o arch/x86/kernel/acpi/realmode/video-mode.o arch/x86/kernel/acpi/realmode/copy.o arch/x86/kernel/acpi/realmode/video-vga.o arch/x86/kernel/acpi/realmode/video-vesa.o arch/x86/kernel/acpi/realmode/video-bios.o -o arch/x86/kernel/acpi/realmode/wakeup.elf ld: warning: dot moved backwards before `.text' ld: warning: dot moved backwards before `.text' ld: warning: dot moved backwards before `.text' This is with gcc-4.2.3 and binutils-2.17.50.0.6-5.fc6 20061020. The resulting kernel hasn't broken on me yet, however. A search through the LKML archives showed that this was reported for 2.6.25-rc3-mm1, but I couldn't find any discussion about it after that: <http://marc.info/?l=linux-kernel&m=120470303728010&w=2> The .config causing this warning is available in <http://user.it.uu.se/~mikpe/linux/ale/config-2.6.26-rc1> /Mikael ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-10 20:18 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' Mikael Pettersson @ 2008-05-10 20:23 ` Rafael J. Wysocki 2008-05-10 20:25 ` H. Peter Anvin 1 sibling, 0 replies; 16+ messages in thread From: Rafael J. Wysocki @ 2008-05-10 20:23 UTC (permalink / raw) To: Mikael Pettersson; +Cc: tglx, mingo, hpa, linux-kernel, sam On Saturday, 10 of May 2008, Mikael Pettersson wrote: > Building kernel 2.6.26-rc1 on FC6/i386 causes: > > ld -m elf_i386 -T arch/x86/kernel/acpi/realmode/wakeup.lds arch/x86/kernel/acpi/realmode/wakeup.o arch/x86/kernel/acpi/realmode/wakemain.o arch/x86/kernel/acpi/realmode/video-mode.o arch/x86/kernel/acpi/realmode/copy.o arch/x86/kernel/acpi/realmode/video-vga.o arch/x86/kernel/acpi/realmode/video-vesa.o arch/x86/kernel/acpi/realmode/video-bios.o -o arch/x86/kernel/acpi/realmode/wakeup.elf > ld: warning: dot moved backwards before `.text' > ld: warning: dot moved backwards before `.text' > ld: warning: dot moved backwards before `.text' > > This is with gcc-4.2.3 and binutils-2.17.50.0.6-5.fc6 20061020. > > The resulting kernel hasn't broken on me yet, however. It shouldn't. Have you tried to suspend to RAM? > A search through the LKML archives showed that this was reported > for 2.6.25-rc3-mm1, but I couldn't find any discussion about it > after that: > > <http://marc.info/?l=linux-kernel&m=120470303728010&w=2> > > The .config causing this warning is available in > <http://user.it.uu.se/~mikpe/linux/ale/config-2.6.26-rc1> Well, we don't really know why this happens. It surely doesn't happen with newer toolchains (as of OpenSUSE 10.3 for example). Thanks, Rafael ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-10 20:18 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' Mikael Pettersson 2008-05-10 20:23 ` Rafael J. Wysocki @ 2008-05-10 20:25 ` H. Peter Anvin 2008-05-10 20:56 ` Rafael J. Wysocki 2008-05-10 21:16 ` Sam Ravnborg 1 sibling, 2 replies; 16+ messages in thread From: H. Peter Anvin @ 2008-05-10 20:25 UTC (permalink / raw) To: Mikael Pettersson, Pavel Machek, Rafael J. Wysocki Cc: tglx, mingo, linux-kernel, sam Mikael Pettersson wrote: > > The resulting kernel hasn't broken on me yet, however. > > A search through the LKML archives showed that this was reported > for 2.6.25-rc3-mm1, but I couldn't find any discussion about it > after that: > > <http://marc.info/?l=linux-kernel&m=120470303728010&w=2> > > The .config causing this warning is available in > <http://user.it.uu.se/~mikpe/linux/ale/config-2.6.26-rc1> > This is because the organization of the file was changed, and the linker script wasn't changed to match: SECTIONS { . = HEADER_OFFSET; .header : { *(.header) } . = 0; .text : { *(.text*) } This is crap; the sections should be listed *in order* so the linker can warn properly when something bad happens. The code should be correct; reorganizing the linker script correctly should fix the problem. -hpa ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-10 20:25 ` H. Peter Anvin @ 2008-05-10 20:56 ` Rafael J. Wysocki 2008-05-11 18:52 ` Pavel Machek 2008-05-10 21:16 ` Sam Ravnborg 1 sibling, 1 reply; 16+ messages in thread From: Rafael J. Wysocki @ 2008-05-10 20:56 UTC (permalink / raw) To: H. Peter Anvin Cc: Mikael Pettersson, Pavel Machek, tglx, mingo, linux-kernel, sam On Saturday, 10 of May 2008, H. Peter Anvin wrote: > Mikael Pettersson wrote: > > > > The resulting kernel hasn't broken on me yet, however. > > > > A search through the LKML archives showed that this was reported > > for 2.6.25-rc3-mm1, but I couldn't find any discussion about it > > after that: > > > > <http://marc.info/?l=linux-kernel&m=120470303728010&w=2> > > > > The .config causing this warning is available in > > <http://user.it.uu.se/~mikpe/linux/ale/config-2.6.26-rc1> > > > > This is because the organization of the file was changed, and the linker > script wasn't changed to match: > > SECTIONS > { > . = HEADER_OFFSET; > .header : { > *(.header) > } > > . = 0; > .text : { > *(.text*) > } > > This is crap; the sections should be listed *in order* so the linker can > warn properly when something bad happens. > > The code should be correct; reorganizing the linker script correctly > should fix the problem. Hm. The above is from Pavel and Sam. Thanks, Rafael ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-10 20:56 ` Rafael J. Wysocki @ 2008-05-11 18:52 ` Pavel Machek 0 siblings, 0 replies; 16+ messages in thread From: Pavel Machek @ 2008-05-11 18:52 UTC (permalink / raw) To: Rafael J. Wysocki Cc: H. Peter Anvin, Mikael Pettersson, tglx, mingo, linux-kernel, sam Hi! > > > The resulting kernel hasn't broken on me yet, however. > > > > > > A search through the LKML archives showed that this was reported > > > for 2.6.25-rc3-mm1, but I couldn't find any discussion about it > > > after that: > > > > > > <http://marc.info/?l=linux-kernel&m=120470303728010&w=2> > > > > > > The .config causing this warning is available in > > > <http://user.it.uu.se/~mikpe/linux/ale/config-2.6.26-rc1> > > > > > > > This is because the organization of the file was changed, and the linker > > script wasn't changed to match: > > > > SECTIONS > > { > > . = HEADER_OFFSET; > > .header : { > > *(.header) > > } > > > > . = 0; > > .text : { > > *(.text*) > > } > > > > This is crap; the sections should be listed *in order* so the linker can > > warn properly when something bad happens. > > > > The code should be correct; reorganizing the linker script correctly > > should fix the problem. I'm not good at linker magic. I needed to put code from offset zero, while still having header at known address... > Hm. The above is from Pavel and Sam. Sorry about that. Plus, I'm on holidays just now... Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-10 20:25 ` H. Peter Anvin 2008-05-10 20:56 ` Rafael J. Wysocki @ 2008-05-10 21:16 ` Sam Ravnborg 2008-05-11 15:44 ` Cyrill Gorcunov 1 sibling, 1 reply; 16+ messages in thread From: Sam Ravnborg @ 2008-05-10 21:16 UTC (permalink / raw) To: H. Peter Anvin Cc: Mikael Pettersson, Pavel Machek, Rafael J. Wysocki, tglx, mingo, linux-kernel On Sat, May 10, 2008 at 01:25:53PM -0700, H. Peter Anvin wrote: > Mikael Pettersson wrote: > > > >The resulting kernel hasn't broken on me yet, however. > > > >A search through the LKML archives showed that this was reported > >for 2.6.25-rc3-mm1, but I couldn't find any discussion about it > >after that: > > > ><http://marc.info/?l=linux-kernel&m=120470303728010&w=2> > > > >The .config causing this warning is available in > ><http://user.it.uu.se/~mikpe/linux/ale/config-2.6.26-rc1> > > > > This is because the organization of the file was changed, and the linker > script wasn't changed to match: > > SECTIONS > { > . = HEADER_OFFSET; > .header : { > *(.header) > } > > . = 0; > .text : { > *(.text*) > } > > This is crap; the sections should be listed *in order* so the linker can > warn properly when something bad happens. > > The code should be correct; reorganizing the linker script correctly > should fix the problem. I need Pavel to comment on this. Why we start with . equal 0x3f00 and then later as . equals 0x0000 I dunno. I did not look into this part of the code back then - but I should anyway have seen this flaw in the linker script :-( Sam ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-10 21:16 ` Sam Ravnborg @ 2008-05-11 15:44 ` Cyrill Gorcunov 2008-05-11 18:15 ` H. Peter Anvin 2008-05-11 18:54 ` Pavel Machek 0 siblings, 2 replies; 16+ messages in thread From: Cyrill Gorcunov @ 2008-05-11 15:44 UTC (permalink / raw) To: Sam Ravnborg Cc: H. Peter Anvin, Mikael Pettersson, Pavel Machek, Rafael J. Wysocki, tglx, mingo, linux-kernel [Sam Ravnborg - Sat, May 10, 2008 at 11:16:02PM +0200] | On Sat, May 10, 2008 at 01:25:53PM -0700, H. Peter Anvin wrote: | > Mikael Pettersson wrote: | > > | > >The resulting kernel hasn't broken on me yet, however. | > > | > >A search through the LKML archives showed that this was reported | > >for 2.6.25-rc3-mm1, but I couldn't find any discussion about it | > >after that: | > > | > ><http://marc.info/?l=linux-kernel&m=120470303728010&w=2> | > > | > >The .config causing this warning is available in | > ><http://user.it.uu.se/~mikpe/linux/ale/config-2.6.26-rc1> | > > | > | > This is because the organization of the file was changed, and the linker | > script wasn't changed to match: | > | > SECTIONS | > { | > . = HEADER_OFFSET; | > .header : { | > *(.header) | > } | > | > . = 0; | > .text : { | > *(.text*) | > } | > | > This is crap; the sections should be listed *in order* so the linker can | > warn properly when something bad happens. | > | > The code should be correct; reorganizing the linker script correctly | > should fix the problem. | | I need Pavel to comment on this. | Why we start with . equal 0x3f00 and then later as . equals 0x0000 | I dunno. | I did not look into this part of the code back then - but I should anyway | have seen this flaw in the linker script :-( | | Sam Should not it be something like --- diff --git a/arch/x86/kernel/acpi/realmode/wakeup.lds.S b/arch/x86/kernel/acpi/realmode/wakeup.lds.S index 22fab6c..cccf62d 100644 --- a/arch/x86/kernel/acpi/realmode/wakeup.lds.S +++ b/arch/x86/kernel/acpi/realmode/wakeup.lds.S @@ -12,11 +12,6 @@ ENTRY(_start) SECTIONS { - . = HEADER_OFFSET; - .header : { - *(.header) - } - . = 0; .text : { *(.text*) @@ -53,6 +48,11 @@ SECTIONS . = ALIGN(16); _end = .; + . = HEADER_OFFSET; + .header : { + *(.header) + } + /DISCARD/ : { *(.note*) } --- - Cyrill - ^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-11 15:44 ` Cyrill Gorcunov @ 2008-05-11 18:15 ` H. Peter Anvin 2008-05-11 18:24 ` Cyrill Gorcunov 2008-05-11 18:54 ` Pavel Machek 1 sibling, 1 reply; 16+ messages in thread From: H. Peter Anvin @ 2008-05-11 18:15 UTC (permalink / raw) To: Cyrill Gorcunov Cc: Sam Ravnborg, Mikael Pettersson, Pavel Machek, Rafael J. Wysocki, tglx, mingo, linux-kernel Cyrill Gorcunov wrote: > > Should not it be something like > --- > > diff --git a/arch/x86/kernel/acpi/realmode/wakeup.lds.S b/arch/x86/kernel/acpi/realmode/wakeup.lds.S > index 22fab6c..cccf62d 100644 > --- a/arch/x86/kernel/acpi/realmode/wakeup.lds.S > +++ b/arch/x86/kernel/acpi/realmode/wakeup.lds.S > @@ -12,11 +12,6 @@ ENTRY(_start) > > SECTIONS > { > - . = HEADER_OFFSET; > - .header : { > - *(.header) > - } > - > . = 0; > .text : { > *(.text*) > @@ -53,6 +48,11 @@ SECTIONS > . = ALIGN(16); > _end = .; > > + . = HEADER_OFFSET; > + .header : { > + *(.header) > + } > + > /DISCARD/ : { > *(.note*) > } > --- > - Cyrill - Yes. This was the way I originally had it, then Pavel decided to move the header to the end. -hpa ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-11 18:15 ` H. Peter Anvin @ 2008-05-11 18:24 ` Cyrill Gorcunov 2008-05-11 18:25 ` H. Peter Anvin 0 siblings, 1 reply; 16+ messages in thread From: Cyrill Gorcunov @ 2008-05-11 18:24 UTC (permalink / raw) To: H. Peter Anvin Cc: Sam Ravnborg, Mikael Pettersson, Pavel Machek, Rafael J. Wysocki, tglx, mingo, linux-kernel [H. Peter Anvin - Sun, May 11, 2008 at 11:15:04AM -0700] > Cyrill Gorcunov wrote: >> Should not it be something like >> --- >> diff --git a/arch/x86/kernel/acpi/realmode/wakeup.lds.S >> b/arch/x86/kernel/acpi/realmode/wakeup.lds.S >> index 22fab6c..cccf62d 100644 >> --- a/arch/x86/kernel/acpi/realmode/wakeup.lds.S >> +++ b/arch/x86/kernel/acpi/realmode/wakeup.lds.S >> @@ -12,11 +12,6 @@ ENTRY(_start) >> SECTIONS >> { >> - . = HEADER_OFFSET; >> - .header : { >> - *(.header) >> - } >> - >> . = 0; >> .text : { >> *(.text*) >> @@ -53,6 +48,11 @@ SECTIONS >> . = ALIGN(16); >> _end = .; >> + . = HEADER_OFFSET; >> + .header : { >> + *(.header) >> + } >> + >> /DISCARD/ : { >> *(.note*) >> } >> --- >> - Cyrill - > > Yes. This was the way I originally had it, then Pavel decided to move the > header to the end. > > -hpa > Hi Peter, actually I only doubt about exactly position of this headers - I mean meguess it better should be _before_ "_end" not after. Since the others script uses (acpi/wakeup_rm.S): wakeup_code_start: .incbin "arch/x86/kernel/acpi/realmode/wakeup.bin" wakeup_code_end: and kernel uses these wakeup_code_* marks to save/restore memory I think it should be like . = HEADER_OFFSET; .header : { ... } . = ALIGN(16); _end = .; /DISCARD/ ... - Cyrill - ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-11 18:24 ` Cyrill Gorcunov @ 2008-05-11 18:25 ` H. Peter Anvin 2008-05-11 18:29 ` Cyrill Gorcunov 0 siblings, 1 reply; 16+ messages in thread From: H. Peter Anvin @ 2008-05-11 18:25 UTC (permalink / raw) To: Cyrill Gorcunov Cc: Sam Ravnborg, Mikael Pettersson, Pavel Machek, Rafael J. Wysocki, tglx, mingo, linux-kernel Cyrill Gorcunov wrote: > > Hi Peter, > > actually I only doubt about exactly position of this headers - I mean > meguess it better should be _before_ "_end" not after. Since the others > script uses (acpi/wakeup_rm.S): > > wakeup_code_start: > .incbin "arch/x86/kernel/acpi/realmode/wakeup.bin" > wakeup_code_end: > > and kernel uses these wakeup_code_* marks to save/restore memory I think > it should be like > > . = HEADER_OFFSET; > .header : { > ... > } > . = ALIGN(16); > _end = .; > /DISCARD/ ... > Yes, I believe that's correct. -hpa ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-11 18:25 ` H. Peter Anvin @ 2008-05-11 18:29 ` Cyrill Gorcunov 2008-05-11 21:22 ` Rafael J. Wysocki 0 siblings, 1 reply; 16+ messages in thread From: Cyrill Gorcunov @ 2008-05-11 18:29 UTC (permalink / raw) To: H. Peter Anvin Cc: Sam Ravnborg, Mikael Pettersson, Pavel Machek, Rafael J. Wysocki, tglx, mingo, linux-kernel [H. Peter Anvin - Sun, May 11, 2008 at 11:25:54AM -0700] > Cyrill Gorcunov wrote: >> Hi Peter, >> actually I only doubt about exactly position of this headers - I mean >> meguess it better should be _before_ "_end" not after. Since the others >> script uses (acpi/wakeup_rm.S): >> wakeup_code_start: >> .incbin "arch/x86/kernel/acpi/realmode/wakeup.bin" >> wakeup_code_end: >> and kernel uses these wakeup_code_* marks to save/restore memory I think >> it should be like >> . = HEADER_OFFSET; >> .header : { >> ... >> } >> . = ALIGN(16); >> _end = .; >> /DISCARD/ ... > > Yes, I believe that's correct. > > -hpa > Thanks for review, Peter, I'll cook a patch and wait for Pavel's opinion ;-) - Cyrill - ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-11 18:29 ` Cyrill Gorcunov @ 2008-05-11 21:22 ` Rafael J. Wysocki 2008-05-12 4:15 ` Cyrill Gorcunov 2008-05-12 6:52 ` Pavel Machek 0 siblings, 2 replies; 16+ messages in thread From: Rafael J. Wysocki @ 2008-05-11 21:22 UTC (permalink / raw) To: Cyrill Gorcunov Cc: H. Peter Anvin, Sam Ravnborg, Mikael Pettersson, Pavel Machek, tglx, mingo, linux-kernel On Sunday, 11 of May 2008, Cyrill Gorcunov wrote: > [H. Peter Anvin - Sun, May 11, 2008 at 11:25:54AM -0700] > > Cyrill Gorcunov wrote: > >> Hi Peter, > >> actually I only doubt about exactly position of this headers - I mean > >> meguess it better should be _before_ "_end" not after. Since the others > >> script uses (acpi/wakeup_rm.S): > >> wakeup_code_start: > >> .incbin "arch/x86/kernel/acpi/realmode/wakeup.bin" > >> wakeup_code_end: > >> and kernel uses these wakeup_code_* marks to save/restore memory I think > >> it should be like > >> . = HEADER_OFFSET; > >> .header : { > >> ... > >> } > >> . = ALIGN(16); > >> _end = .; > >> /DISCARD/ ... > > > > Yes, I believe that's correct. > > > > -hpa > > > > Thanks for review, Peter, I'll cook a patch and wait for > Pavel's opinion ;-) I've tested the appended one. If that's what you mean, we'll ask Ingo to take it. Thanks, Rafael --- arch/x86/kernel/acpi/realmode/wakeup.lds.S | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) Index: linux-2.6/arch/x86/kernel/acpi/realmode/wakeup.lds.S =================================================================== --- linux-2.6.orig/arch/x86/kernel/acpi/realmode/wakeup.lds.S +++ linux-2.6/arch/x86/kernel/acpi/realmode/wakeup.lds.S @@ -12,11 +12,6 @@ ENTRY(_start) SECTIONS { - . = HEADER_OFFSET; - .header : { - *(.header) - } - . = 0; .text : { *(.text*) @@ -50,6 +45,11 @@ SECTIONS __bss_end = .; } + . = HEADER_OFFSET; + .header : { + *(.header) + } + . = ALIGN(16); _end = .; ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-11 21:22 ` Rafael J. Wysocki @ 2008-05-12 4:15 ` Cyrill Gorcunov 2008-05-12 6:16 ` Cyrill Gorcunov 2008-05-12 6:52 ` Pavel Machek 1 sibling, 1 reply; 16+ messages in thread From: Cyrill Gorcunov @ 2008-05-12 4:15 UTC (permalink / raw) To: Rafael J. Wysocki Cc: H. Peter Anvin, Sam Ravnborg, Mikael Pettersson, Pavel Machek, tglx, mingo, linux-kernel On Mon, May 12, 2008 at 1:22 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote: > On Sunday, 11 of May 2008, Cyrill Gorcunov wrote: >> [H. Peter Anvin - Sun, May 11, 2008 at 11:25:54AM -0700] >> > Cyrill Gorcunov wrote: >> >> Hi Peter, >> >> actually I only doubt about exactly position of this headers - I mean >> >> meguess it better should be _before_ "_end" not after. Since the others >> >> script uses (acpi/wakeup_rm.S): >> >> wakeup_code_start: >> >> .incbin "arch/x86/kernel/acpi/realmode/wakeup.bin" >> >> wakeup_code_end: >> >> and kernel uses these wakeup_code_* marks to save/restore memory I think >> >> it should be like >> >> . = HEADER_OFFSET; >> >> .header : { >> >> ... >> >> } >> >> . = ALIGN(16); >> >> _end = .; >> >> /DISCARD/ ... >> > >> > Yes, I believe that's correct. >> > >> > -hpa >> > >> >> Thanks for review, Peter, I'll cook a patch and wait for >> Pavel's opinion ;-) > > I've tested the appended one. If that's what you mean, we'll ask Ingo to take > it. > > Thanks, > Rafael > > > --- > arch/x86/kernel/acpi/realmode/wakeup.lds.S | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > Index: linux-2.6/arch/x86/kernel/acpi/realmode/wakeup.lds.S > =================================================================== > --- linux-2.6.orig/arch/x86/kernel/acpi/realmode/wakeup.lds.S > +++ linux-2.6/arch/x86/kernel/acpi/realmode/wakeup.lds.S > @@ -12,11 +12,6 @@ ENTRY(_start) > > SECTIONS > { > - . = HEADER_OFFSET; > - .header : { > - *(.header) > - } > - > . = 0; > .text : { > *(.text*) > @@ -50,6 +45,11 @@ SECTIONS > __bss_end = .; > } > > + . = HEADER_OFFSET; > + .header : { > + *(.header) > + } > + > . = ALIGN(16); > _end = .; > > Thanks Rafael, it's exactly what I meant - http://lkml.org/lkml/2008/5/11/120 ;) ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-12 4:15 ` Cyrill Gorcunov @ 2008-05-12 6:16 ` Cyrill Gorcunov 0 siblings, 0 replies; 16+ messages in thread From: Cyrill Gorcunov @ 2008-05-12 6:16 UTC (permalink / raw) To: Rafael J. Wysocki Cc: H. Peter Anvin, Sam Ravnborg, Mikael Pettersson, Pavel Machek, tglx, mingo, linux-kernel On Mon, May 12, 2008 at 8:15 AM, Cyrill Gorcunov <gorcunov@gmail.com> wrote: > On Mon, May 12, 2008 at 1:22 AM, Rafael J. Wysocki <rjw@sisk.pl> wrote: >> On Sunday, 11 of May 2008, Cyrill Gorcunov wrote: >>> [H. Peter Anvin - Sun, May 11, 2008 at 11:25:54AM -0700] >>> > Cyrill Gorcunov wrote: >>> >> Hi Peter, >>> >> actually I only doubt about exactly position of this headers - I mean >>> >> meguess it better should be _before_ "_end" not after. Since the others >>> >> script uses (acpi/wakeup_rm.S): >>> >> wakeup_code_start: >>> >> .incbin "arch/x86/kernel/acpi/realmode/wakeup.bin" >>> >> wakeup_code_end: >>> >> and kernel uses these wakeup_code_* marks to save/restore memory I think >>> >> it should be like >>> >> . = HEADER_OFFSET; >>> >> .header : { >>> >> ... >>> >> } >>> >> . = ALIGN(16); >>> >> _end = .; >>> >> /DISCARD/ ... >>> > >>> > Yes, I believe that's correct. >>> > >>> > -hpa >>> > >>> >>> Thanks for review, Peter, I'll cook a patch and wait for >>> Pavel's opinion ;-) >> >> I've tested the appended one. If that's what you mean, we'll ask Ingo to take >> it. >> >> Thanks, >> Rafael >> >> >> --- >> arch/x86/kernel/acpi/realmode/wakeup.lds.S | 10 +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> Index: linux-2.6/arch/x86/kernel/acpi/realmode/wakeup.lds.S >> =================================================================== >> --- linux-2.6.orig/arch/x86/kernel/acpi/realmode/wakeup.lds.S >> +++ linux-2.6/arch/x86/kernel/acpi/realmode/wakeup.lds.S >> @@ -12,11 +12,6 @@ ENTRY(_start) >> >> SECTIONS >> { >> - . = HEADER_OFFSET; >> - .header : { >> - *(.header) >> - } >> - >> . = 0; >> .text : { >> *(.text*) >> @@ -50,6 +45,11 @@ SECTIONS >> __bss_end = .; >> } >> >> + . = HEADER_OFFSET; >> + .header : { >> + *(.header) >> + } >> + >> . = ALIGN(16); >> _end = .; >> >> > > Thanks Rafael, > > it's exactly what I meant - http://lkml.org/lkml/2008/5/11/120 ;) > Heh, now we have even two patches (exactly the same in contents). So, Ingo, could you pick up any patch, please? ;-) (i'm in office now without access to my linux machine, so I can't send the patch with my and Rafael's sign-offs) ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-11 21:22 ` Rafael J. Wysocki 2008-05-12 4:15 ` Cyrill Gorcunov @ 2008-05-12 6:52 ` Pavel Machek 1 sibling, 0 replies; 16+ messages in thread From: Pavel Machek @ 2008-05-12 6:52 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Cyrill Gorcunov, H. Peter Anvin, Sam Ravnborg, Mikael Pettersson, tglx, mingo, linux-kernel On Sun 2008-05-11 23:22:52, Rafael J. Wysocki wrote: > On Sunday, 11 of May 2008, Cyrill Gorcunov wrote: > > [H. Peter Anvin - Sun, May 11, 2008 at 11:25:54AM -0700] > > > Cyrill Gorcunov wrote: > > >> Hi Peter, > > >> actually I only doubt about exactly position of this headers - I mean > > >> meguess it better should be _before_ "_end" not after. Since the others > > >> script uses (acpi/wakeup_rm.S): > > >> wakeup_code_start: > > >> .incbin "arch/x86/kernel/acpi/realmode/wakeup.bin" > > >> wakeup_code_end: > > >> and kernel uses these wakeup_code_* marks to save/restore memory I think > > >> it should be like > > >> . = HEADER_OFFSET; > > >> .header : { > > >> ... > > >> } > > >> . = ALIGN(16); > > >> _end = .; > > >> /DISCARD/ ... > > > > > > Yes, I believe that's correct. > > > > > > -hpa > > > > > > > Thanks for review, Peter, I'll cook a patch and wait for > > Pavel's opinion ;-) > > I've tested the appended one. If that's what you mean, we'll ask Ingo to take > it. ACK... and thanks! Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' 2008-05-11 15:44 ` Cyrill Gorcunov 2008-05-11 18:15 ` H. Peter Anvin @ 2008-05-11 18:54 ` Pavel Machek 1 sibling, 0 replies; 16+ messages in thread From: Pavel Machek @ 2008-05-11 18:54 UTC (permalink / raw) To: Cyrill Gorcunov Cc: Sam Ravnborg, H. Peter Anvin, Mikael Pettersson, Rafael J. Wysocki, tglx, mingo, linux-kernel On Sun 2008-05-11 19:44:11, Cyrill Gorcunov wrote: > [Sam Ravnborg - Sat, May 10, 2008 at 11:16:02PM +0200] > | On Sat, May 10, 2008 at 01:25:53PM -0700, H. Peter Anvin wrote: > | > Mikael Pettersson wrote: > | > > > | > >The resulting kernel hasn't broken on me yet, however. > | > > > | > >A search through the LKML archives showed that this was reported > | > >for 2.6.25-rc3-mm1, but I couldn't find any discussion about it > | > >after that: > | > > > | > ><http://marc.info/?l=linux-kernel&m=120470303728010&w=2> > | > > > | > >The .config causing this warning is available in > | > ><http://user.it.uu.se/~mikpe/linux/ale/config-2.6.26-rc1> > | > > > | > > | > This is because the organization of the file was changed, and the linker > | > script wasn't changed to match: > | > > | > SECTIONS > | > { > | > . = HEADER_OFFSET; > | > .header : { > | > *(.header) > | > } > | > > | > . = 0; > | > .text : { > | > *(.text*) > | > } > | > > | > This is crap; the sections should be listed *in order* so the linker can > | > warn properly when something bad happens. > | > > | > The code should be correct; reorganizing the linker script correctly > | > should fix the problem. > | > | I need Pavel to comment on this. > | Why we start with . equal 0x3f00 and then later as . equals 0x0000 > | I dunno. > | I did not look into this part of the code back then - but I should anyway > | have seen this flaw in the linker script :-( > | > | Sam > > Should not it be something like > --- > > diff --git a/arch/x86/kernel/acpi/realmode/wakeup.lds.S b/arch/x86/kernel/acpi/realmode/wakeup.lds.S > index 22fab6c..cccf62d 100644 > --- a/arch/x86/kernel/acpi/realmode/wakeup.lds.S > +++ b/arch/x86/kernel/acpi/realmode/wakeup.lds.S > @@ -12,11 +12,6 @@ ENTRY(_start) > > SECTIONS > { > - . = HEADER_OFFSET; > - .header : { > - *(.header) > - } > - > . = 0; > .text : { > *(.text*) > @@ -53,6 +48,11 @@ SECTIONS > . = ALIGN(16); > _end = .; > > + . = HEADER_OFFSET; > + .header : { > + *(.header) > + } > + > /DISCARD/ : { > *(.note*) > } If it passes s2ram/resume test, it is probably correct ;-). Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2008-05-12 6:52 UTC | newest] Thread overview: 16+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-05-10 20:18 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text' Mikael Pettersson 2008-05-10 20:23 ` Rafael J. Wysocki 2008-05-10 20:25 ` H. Peter Anvin 2008-05-10 20:56 ` Rafael J. Wysocki 2008-05-11 18:52 ` Pavel Machek 2008-05-10 21:16 ` Sam Ravnborg 2008-05-11 15:44 ` Cyrill Gorcunov 2008-05-11 18:15 ` H. Peter Anvin 2008-05-11 18:24 ` Cyrill Gorcunov 2008-05-11 18:25 ` H. Peter Anvin 2008-05-11 18:29 ` Cyrill Gorcunov 2008-05-11 21:22 ` Rafael J. Wysocki 2008-05-12 4:15 ` Cyrill Gorcunov 2008-05-12 6:16 ` Cyrill Gorcunov 2008-05-12 6:52 ` Pavel Machek 2008-05-11 18:54 ` Pavel Machek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox