Messages in this thread | | | Date | Thu, 15 Oct 2009 08:38:37 +0200 | From | Ingo Molnar <> | Subject | Re: [PATCH] x86: linker script syntax nits |
| |
* Sam Ravnborg <sam@ravnborg.org> wrote:
> On Wed, Oct 14, 2009 at 03:10:24PM -0700, Roland McGrath wrote: > > The following changes since commit 80f506918fdaaca6b574ba931536a58ce015c7be: > > Linus Torvalds (1): > > Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block > > > > are available in the git repository at: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland.git topic/x86-lds-nits > > > > Roland McGrath (1): > > x86: linker script syntax nits > > > > arch/x86/kernel/acpi/realmode/wakeup.lds.S | 4 ++-- > > arch/x86/kernel/vmlinux.lds.S | 17 ++++++++--------- > > 2 files changed, 10 insertions(+), 11 deletions(-) > > --- > > [PATCH] x86: linker script syntax nits > > > > The linker scripts grew some use of weirdly wrong linker script syntax. > > It happens to work, but it's not what the syntax is documented to be. > > Clean it up to use the official syntax. > > > > Signed-off-by: Roland McGrath <roland@redhat.com> > > CC: Ian Lance Taylor <iant@google.com> > > --- > > arch/x86/kernel/acpi/realmode/wakeup.lds.S | 4 ++-- > > arch/x86/kernel/vmlinux.lds.S | 17 ++++++++--------- > > 2 files changed, 10 insertions(+), 11 deletions(-) > > > > diff --git a/arch/x86/kernel/acpi/realmode/wakeup.lds.S b/arch/x86/kernel/acpi/realmode/wakeup.lds.S > > index 7da00b7..0e50e1e 100644 > > --- a/arch/x86/kernel/acpi/realmode/wakeup.lds.S > > +++ b/arch/x86/kernel/acpi/realmode/wakeup.lds.S > > @@ -56,6 +56,6 @@ SECTIONS > > /DISCARD/ : { > > *(.note*) > > } > > - > > - . = ASSERT(_end <= WAKEUP_SIZE, "Wakeup too big!"); > > } > > + > > +ASSERT(_end <= WAKEUP_SIZE, "Wakeup too big!"); > > This breaks with older binutils. See > d2ba8b211bb8abc29aa627dbd4dce08cfbc8082b for reference. > > Same goes for the other cahnges in this post. > > Yup - it looks ugly :-(
We could introduce a COMPAT_ASSERT() wrapper perhaps, to move it more in line with the 'official' syntax.
Or we could wrap ASSERT() itself (this runs through the preprocessor before going to the linker) - although that would be a pretty obfuscated move.
At minimum we should add a comment to the first use of ASSERT() here that we assign the current address due to compatibility reasons. (same goes for arch/x86/boot/setup.ld)
Anyway - any such cleanup would be .33 material.
Ingo
| |