From: Johannes Weiner <jw@emlix.com>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
David Howells <dhowells@redhat.com>,
Russell King <rmk@arm.linux.org.uk>,
Bryan Wu <cooloney@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Paul Mundt <lethal@linux-sh.org>, Greg Ungerer <gerg@uclinux.org>,
linux-kernel@vger.kernel.org
Subject: Re: [patch -v2] flat: fix data sections alignment
Date: Wed, 4 Mar 2009 20:33:53 +0100 [thread overview]
Message-ID: <E1LewqM-0005Tp-R1@mailer.emlix.com> (raw)
In-Reply-To: <8bd0f97a0903041004g467cbe47jc7c66261da01348c@mail.gmail.com>
On Wed, Mar 04, 2009 at 01:04:00PM -0500, Mike Frysinger wrote:
> On Wed, Mar 4, 2009 at 08:51, Johannes Weiner wrote:
> > The flat loader uses an architecture's flat_stack_align() to align the
> > stack but assumes word-alignment is enough for the data sections.
> >
> > However, on the Xtensa S6000 we have registers up to 128bit width
> > which can be used from userspace and therefor need userspace stack and
> > data-section alignment of at least this size.
>
> could this perhaps be a gcc problem ? x86 has a similar problem with
> sse and they addressed it with a function attribute. after all, just
> because your stack started out 128bit aligned doesnt mean gcc will
> keep it that way when calling other functions. so having the stack
> start out aligned would only "fix" the stack for the application's
> entry point right (which would in practice bubble up to main()) ? so
> you'd be right back where you started ...
gcc generates sp changes only ever in multiples of 16 deltas, I just
checked it again with various amounts of stack variables.
The stack frames allocate themselves with an ENTRY instruction and the
generated code I read here allocates stack frames of n * 16 bytes.
So we are good to go as long as the initial stack frame is properly
aligned.
> -mike
Hannes
next prev parent reply other threads:[~2009-03-04 19:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 13:51 Johannes Weiner
2009-03-04 18:04 ` Mike Frysinger
2009-03-04 19:33 ` Johannes Weiner [this message]
2009-03-04 20:00 ` Mike Frysinger
2009-03-04 20:13 ` Johannes Weiner
2009-03-04 21:48 ` Mike Frysinger
2009-03-05 10:53 ` Johannes Weiner
2009-03-05 16:40 ` Oskar Schirmer
2009-03-05 8:43 ` Paul Mundt
2009-05-29 0:01 ` John Williams
2009-05-29 3:58 ` Paul Mundt
2009-05-29 5:11 ` John Williams
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=E1LewqM-0005Tp-R1@mailer.emlix.com \
--to=jw@emlix.com \
--cc=akpm@linux-foundation.org \
--cc=cooloney@kernel.org \
--cc=dhowells@redhat.com \
--cc=geert@linux-m68k.org \
--cc=gerg@uclinux.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=vapier.adi@gmail.com \
/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
Powered by JetHome