mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>, "H. Peter Anvin" <hpa@zytor.com>,
	Mikael Pettersson <mikpe@it.uu.se>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	tglx@linutronix.de, mingo@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: 2.6.26-rc1 on x86: ld: warning: dot moved backwards before `.text'
Date: Sun, 11 May 2008 20:54:45 +0200	[thread overview]
Message-ID: <20080511185445.GB5599@elf.ucw.cz> (raw)
In-Reply-To: <20080511154411.GB6942@cvg>

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

      parent reply	other threads:[~2008-05-11 18:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-10 20:18 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 message]

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=20080511185445.GB5599@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=gorcunov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    --cc=mingo@redhat.com \
    --cc=rjw@sisk.pl \
    --cc=sam@ravnborg.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®