From: Sam Ravnborg <sam@ravnborg.org>
To: Andreas Schwab <schwab@suse.de>
Cc: Adrian Bunk <bunk@stusta.de>, Adam Belay <ambx1@neo.rr.com>,
Thomas Hood <jdthood@mail.com>,
linux-kernel@vger.kernel.org
Subject: Re: What exactly is __ALIGN_STR in pnpbios/bioscalls.c for?
Date: Sun, 21 Nov 2004 23:17:03 +0100 [thread overview]
Message-ID: <20041121221703.GA7856@mars.ravnborg.org> (raw)
In-Reply-To: <jefz337xoz.fsf@sykes.suse.de>
On Sun, Nov 21, 2004 at 09:29:32PM +0100, Andreas Schwab wrote:
> Adrian Bunk <bunk@stusta.de> writes:
> It's for aligning function entries to a 16 byte boundary instead of only 4
> bytes, used together with -malign-functions. See also the ENTRY macro.
> Note that the default value of __ALIGN is actually useless for anything
> but x86 and x86-64.
Recently someone complained that __sched_text_start changed address during
pass one and two of kallsyms. The actual culprint was that an
address changed due to different section layout.
The fix I posted was to align .sched.text to an 8 byte boundary.
Can we say anything about alignment of functions across architectures?
Patch in question below.
Grepping tells me to use FUNCTION_ALIGN if I push this for inclusion.
Sam
===== include/asm-generic/vmlinux.lds.h 1.16 vs edited =====
--- 1.16/include/asm-generic/vmlinux.lds.h 2004-10-06 18:45:06 +02:00
+++ edited/include/asm-generic/vmlinux.lds.h 2004-11-06 21:56:11 +01:00
@@ -6,6 +6,11 @@
#define VMLINUX_SYMBOL(_sym_) _sym_
#endif
+/* Aling functions to a 8 byte boundary.
+ * This prevents lables defined to mark start/end of section to differ
+ * during pass 1 and pass 2 when generating System.map */
+#define ALIGN_FUNCTION() . = ALIGN(8)
+
#define RODATA \
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
*(.rodata) *(.rodata.*) \
@@ -77,11 +82,13 @@
}
#define SCHED_TEXT \
+ ALIGN_FUNCTION(); \
VMLINUX_SYMBOL(__sched_text_start) = .; \
*(.sched.text) \
VMLINUX_SYMBOL(__sched_text_end) = .;
#define LOCK_TEXT \
+ ALIGN_FUNCTION(); \
VMLINUX_SYMBOL(__lock_text_start) = .; \
*(.spinlock.text) \
VMLINUX_SYMBOL(__lock_text_end) = .;
next prev parent reply other threads:[~2004-11-21 22:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-21 17:56 Adrian Bunk
2004-11-21 20:29 ` Andreas Schwab
2004-11-21 22:17 ` Sam Ravnborg [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-08-06 21:38 Adrian Bunk
2004-01-10 2:22 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=20041121221703.GA7856@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=ambx1@neo.rr.com \
--cc=bunk@stusta.de \
--cc=jdthood@mail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=schwab@suse.de \
/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®