From: Jessica Yu <jeyu@redhat.com>
To: David Daney <david.daney@cavium.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Andrey Ryabinin <a.ryabinin@samsung.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] module: set .init_array alignment to 8
Date: Mon, 13 Mar 2017 14:46:09 -0400 [thread overview]
Message-ID: <20170313184609.GC8117@packer-debian-8-amd64.digitalocean.com> (raw)
In-Reply-To: <20170308013108.13345-1-david.daney@cavium.com>
+++ David Daney [07/03/17 17:31 -0800]:
>The proper idiom for aligning linker sections in modules is different
>than for built-in sections. ". = ALIGN();" followed by a forced
>output address of 0 does nothing, as forcing the address changes the
>value of ".".
>
>Use output section alignment specifier instead.
>
>Fixes: 9ddf82521c86 ("kernel: add support for .init_array.* constructors")
>Signed-off-by: David Daney <david.daney@cavium.com>
Good catch, thanks. I've applied this to modules-next.
Jessica
>I noticed this when doing the __jump_table thing. Doesn't seem to
>break a defconfig build, but otherwise untested.
>
> scripts/module-common.lds | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/scripts/module-common.lds b/scripts/module-common.lds
>index 9b6e246..d61b9e8 100644
>--- a/scripts/module-common.lds
>+++ b/scripts/module-common.lds
>@@ -20,8 +20,7 @@ SECTIONS {
> __kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) }
> __kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) }
>
>- . = ALIGN(8);
>- .init_array 0 : { *(SORT(.init_array.*)) *(.init_array) }
>+ .init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) }
>
> __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) }
> }
>--
>2.9.3
>
prev parent reply other threads:[~2017-03-13 18:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 1:31 David Daney
2017-03-08 1:35 ` David Daney
2017-03-09 14:26 ` Andrey Ryabinin
2017-03-13 18:46 ` Jessica Yu [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=20170313184609.GC8117@packer-debian-8-amd64.digitalocean.com \
--to=jeyu@redhat.com \
--cc=a.ryabinin@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=david.daney@cavium.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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®