Re: [PATCH] FLAT: allow arches to declare a larger alignment than the slab

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Geert Uytterhoeven
Date: Tuesday, May 25, 2010 - 11:59 pm

On Wed, May 26, 2010 at 04:23, Jie Zhang <jie@codesourcery.com> wrote:

I'm no FLAT expert (except for the AmigaOS HUNK loader :-), but isn't
the core of the
issue that alignment requirements in the object file are no longer
fulfilled after loading,
as a FLAT segment in memory is just allocated using kmalloc(), which may now
return 4-byte aligned blocks?

From looking at <linux/flat.h>, it looks like the FLAT binary format
doesn't contain any
alignment information? So if I put __attribute__((aligned(4096))) in a
file, there's still
no guarantee it will actually be in memory at a 4Ki-aligned address?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] FLAT: allow arches to declare a larger alignme ..., Geert Uytterhoeven, (Tue May 25, 12:50 pm)
Re: [PATCH] FLAT: allow arches to declare a larger alignme ..., Geert Uytterhoeven, (Tue May 25, 11:59 pm)
[PATCH 1/2 v2] FLAT: split the stack &amp; data alignments, Mike Frysinger, (Wed May 26, 1:45 am)
[PATCH 2/2 v2] FLAT: tweak default stack alignment, Mike Frysinger, (Wed May 26, 1:45 am)
Re: [PATCH 1/2 v2] FLAT: split the stack &amp; data alignments, David McCullough, (Thu May 27, 11:23 pm)
Re: [PATCH 2/2 v2] FLAT: tweak default stack alignment, David McCullough, (Thu May 27, 11:24 pm)
Re: [PATCH 2/2 v2] FLAT: tweak default stack alignment, Greg Ungerer, (Thu May 27, 11:39 pm)
[PATCH v3] FLAT: tweak default stack alignment, Mike Frysinger, (Sun Jun 6, 12:12 am)