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

From: Geert Uytterhoeven
Date: Tue May 25 2010 - 15:50:41 EST


On Tue, May 25, 2010 at 21:24, Mike Frysinger <vapier@xxxxxxxxxx> wrote:
> From: Jie Zhang <jie.zhang@xxxxxxxxxx>
>
> The recent commit 1f0ce8b3dd667dca7 which moved the ARCH_SLAB_MINALIGN
> default into the global header inadvertently broke FLAT for a bunch of
> systems. ÂBlackfin systems now fail on any FLAT exec with:
> Unable to read code+data+bss, errno 14
> When your /init is a FLAT binary, obviously this can be annoying ;).
>
> This stems from the alignment usage in the FLAT loader. ÂThe behavior
> before was that FLAT would default to ARCH_SLAB_MINALIGN only if it was
> defined, and this was only defined by arches when they wanted a larger
> alignment value. ÂOtherwise it'd default to pointer alignment. ÂArguably,
^^^^^^^^^^^^^^^^^
That would be __alignof__(void *)

> +#elif defined(ARCH_SLAB_MINALIGN)
> Â#define FLAT_DATA_ALIGN Â Â Â Â(ARCH_SLAB_MINALIGN)
> Â#else
> Â#define FLAT_DATA_ALIGN Â Â Â Â(sizeof(void *))

Not sizeof(void *)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/