From: David Laight <David.Laight@ACULAB.COM>
To: 'Masahiro Yamada' <masahiroy@kernel.org>,
"deller@kernel.org" <deller@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Arnd Bergmann" <arnd@arndb.de>,
"linux-modules@vger.kernel.org" <linux-modules@vger.kernel.org>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>
Subject: RE: [PATCH 0/4] Section alignment issues?
Date: Fri, 22 Dec 2023 09:48:50 +0000 [thread overview]
Message-ID: <364b3128f40d44939586bdc8e8ae7c9d@AcuMS.aculab.com> (raw)
In-Reply-To: <CAK7LNASk=A4aeMuhUt4NGi5RHedcQ_WQrdN3r7S_x0euvsPUXA@mail.gmail.com>
...
> diff --git a/include/linux/init.h b/include/linux/init.h
> index 3fa3f6241350..650311e4b215 100644
> --- a/include/linux/init.h
> +++ b/include/linux/init.h
> @@ -264,6 +264,7 @@ extern struct module __this_module;
> #define ____define_initcall(fn, __stub, __name, __sec) \
> __define_initcall_stub(__stub, fn) \
> asm(".section \"" __sec "\", \"a\" \n" \
> + ".balign 4 \n" \
> __stringify(__name) ": \n" \
> ".long " __stringify(__stub) " - . \n" \
> ".previous \n"); \
>
>
>
> Then, "this section requires at least 4 byte alignment"
> is recorded in the sh_addralign field.
Perhaps one of the headers should contain (something like):
#ifdef CONFIG_64
#define BALIGN_PTR ".balign 8\n"
#else
#define BALIGN_PTR ".balign 4\n"
#endif
to make it all easier (although that example doesn't need it).
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
prev parent reply other threads:[~2023-12-22 9:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 22:18 [PATCH 0/4] Section alignment issues? deller
2023-11-22 22:18 ` [PATCH 1/4] linux/export: Fix alignment for 64-bit ksymtab entries deller
2023-12-21 10:22 ` Masahiro Yamada
2023-12-21 16:01 ` Masahiro Yamada
2023-12-22 6:07 ` Luis Chamberlain
2023-12-22 6:08 ` Luis Chamberlain
2023-12-22 7:01 ` Masahiro Yamada
2023-12-22 20:11 ` Luis Chamberlain
2023-12-23 14:35 ` Masahiro Yamada
2023-11-22 22:18 ` [PATCH 2/4] modules: Ensure 64-bit alignment on __ksymtab_* sections deller
2023-12-22 5:59 ` Luis Chamberlain
2023-12-22 12:13 ` Helge Deller
2023-12-22 20:10 ` Luis Chamberlain
2023-12-30 7:33 ` Helge Deller
2024-01-22 16:10 ` Luis Chamberlain
2024-01-22 16:47 ` Helge Deller
2024-01-22 18:48 ` Luis Chamberlain
2023-11-22 22:18 ` [PATCH 3/4] vmlinux.lds.h: Fix alignment for __ksymtab*, __kcrctab_* and .pci_fixup sections deller
2023-12-21 13:07 ` Masahiro Yamada
2023-12-22 9:02 ` Helge Deller
2023-12-23 4:10 ` Masahiro Yamada
2023-11-22 22:18 ` [PATCH 4/4] modules: Add missing entry for __ex_table deller
2024-01-29 18:50 ` Luis Chamberlain
2023-12-19 21:26 ` [PATCH 0/4] Section alignment issues? Luis Chamberlain
2023-12-20 19:40 ` Luis Chamberlain
2023-12-22 9:13 ` Helge Deller
2023-12-21 13:40 ` Masahiro Yamada
2023-12-21 15:42 ` Masahiro Yamada
2023-12-22 8:23 ` Helge Deller
2023-12-23 1:32 ` Masahiro Yamada
2023-12-22 9:48 ` David Laight [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=364b3128f40d44939586bdc8e8ae7c9d@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=arnd@arndb.de \
--cc=deller@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mcgrof@kernel.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).