lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080121095722.GA29145@uranus.ravnborg.org>
Date:	Mon, 21 Jan 2008 10:57:22 +0100
From:	Sam Ravnborg <sam@...nborg.org>
To:	Paul Mundt <lethal@...ux-sh.org>, linux-kernel@...r.kernel.org,
	linux-kbuild@...r.kernel.org, linux-arch@...r.kernel.org,
	Greg KH <greg@...ah.com>,
	Randy Dunlap <randy.dunlap@...cle.com>,
	Adrian Bunk <bunk@...nel.org>
Subject: Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data

On Mon, Jan 21, 2008 at 04:33:41PM +0900, Paul Mundt wrote:
> On Sun, Jan 20, 2008 at 09:09:03PM +0100, Sam Ravnborg wrote:
> > diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> > index ded7ca2..e0a56fb 100644
> > --- a/include/asm-generic/vmlinux.lds.h
> > +++ b/include/asm-generic/vmlinux.lds.h
> > @@ -9,10 +9,46 @@
> >  /* Align . to a 8 byte boundary equals to maximum function alignment. */
> >  #define ALIGN_FUNCTION()  . = ALIGN(8)
> >  
> > +/* The actual configuration determine if the init/exit sections
> > + * are handled as text/data or they can be discarded (which
> > + * often happens at runtime)
> > + */
> > +#ifdef CONFIG_HOTPLUG
> > +#define DEV_KEEP(sec)    *(.dev##sec)
> > +#define DEV_DISCARD(sec)
> > +#else
> > +#define DEV_KEEP(sec)
> > +#define DEV_DISCARD(sec) *(.dev##sec)
> > +#endif
> > +
> Using your kbuild.git, these blow up for me:
> 
>   LD      .tmp_vmlinux1
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:364: ignoring invalid character `#' in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' in script
> sh4-linux-ld:arch/sh/kernel/vmlinux.lds:381: ignoring invalid character `#' in script
> ...
> 
> This comes out as:
> 
>         .text : {
>                 *(.text.head)
>                 . = ALIGN(8);                                                   *(.text)                                                                *(.text.init.refok)                                                     *(.exit.text.refok)                                             *(.dev##init.text)
>                                         *(.dev##exit.text)
> 
>                 . = ALIGN(8);                                                   __sched_text_start = .;                                 *(.sched.text)
>                                                 __sched_text_end = .;
>                 . = ALIGN(8);                                                   __lock_text_start = .;                                  *(.spinlock.text)
>                                                 __lock_text_end = .;
>                 . = ALIGN(8);                                                   __kprobes_text_start = .;                               *(.kprobes.text)
>                                                 __kprobes_text_end = .;
>                 *(.fixup)
>                 *(.gnu.warning)
> ...
> 
> so the ## is being taken directly rather than acting as a concatenation.

Strange...
I can reproduce with gcc 3.4.5 here - will fix.

Setting CONFIG_HOTPLUG=n for sparc64 also cause troubles. Something with local symbols discarded.
So more work is needed.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ