linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-arch@vger.kernel.org, Greg KH <greg@kroah.com>,
	Randy Dunlap <randy.dunlap@oracle.com>,
	Adrian Bunk <bunk@kernel.org>
Subject: Re: [PATCH] Use separate sections for __dev/__cpu/__mem code/data
Date: Mon, 21 Jan 2008 16:33:41 +0900	[thread overview]
Message-ID: <20080121073341.GA20050@linux-sh.org> (raw)
In-Reply-To: <1200859743-24037-8-git-send-email-sam@ravnborg.org>

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.

  reply	other threads:[~2008-01-21  7:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-20 20:05 kbuild: improved Section mismatch detection Sam Ravnborg
2008-01-20 20:08 ` [PATCH] kbuild: fix so modpost can now check any .o file Sam Ravnborg
2008-01-20 20:08   ` [PATCH] kbuild: try harder to find symbol names in modpost Sam Ravnborg
2008-01-20 20:08     ` [PATCH] kbuild: code refactoring " Sam Ravnborg
2008-01-20 20:08       ` [PATCH] kbuild: introduce blacklisting " Sam Ravnborg
2008-01-20 20:09         ` [PATCH] kbuild: check section names consistently " Sam Ravnborg
2008-01-20 20:09           ` [PATCH] all archs: consolidate init and exit sections in vmlinux.lds.h Sam Ravnborg
2008-01-20 20:09             ` [PATCH] compiler.h: introduce __section() Sam Ravnborg
2008-01-20 20:09               ` [PATCH] Use separate sections for __dev/__cpu/__mem code/data Sam Ravnborg
2008-01-21  7:33                 ` Paul Mundt [this message]
2008-01-21  9:57                   ` Sam Ravnborg
2008-01-21 10:29                     ` Andreas Schwab
2008-01-21 10:45                       ` Sam Ravnborg
2008-01-21 10:47                         ` Sam Ravnborg
2008-01-21 10:52                           ` Paul Mundt
2008-01-21 12:06                             ` Sam Ravnborg
2008-01-22  0:56                               ` Paul Mundt
2008-01-22  3:25                                 ` Sam Ravnborg
2008-01-22 21:17                 ` Greg KH
2008-01-22 21:25                   ` Russell King
2008-01-21  1:00         ` [PATCH] kbuild: introduce blacklisting in modpost Rusty Russell
2008-01-21  0:56   ` [PATCH] kbuild: fix so modpost can now check any .o file Rusty Russell
2008-01-21  6:11     ` Sam Ravnborg
2008-01-20 21:33 ` kbuild: improved Section mismatch detection Sam Ravnborg
2008-01-20 22:27 ` Adrian Bunk
2008-01-21  2:51   ` Sam Ravnborg
2008-01-21 20:31   ` Sam Ravnborg
2008-01-21 20:56     ` Adrian Bunk

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=20080121073341.GA20050@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=bunk@kernel.org \
    --cc=greg@kroah.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=randy.dunlap@oracle.com \
    --cc=sam@ravnborg.org \
    /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;
as well as URLs for NNTP newsgroup(s).