Skip to content
  • Mike Frysinger's avatar
    flat: tweak default stack alignment · 2952095c
    Mike Frysinger authored
    The recent commit 1f0ce8b3
    
     ("mm: Move ARCH_SLAB_MINALIGN and
    ARCH_KMALLOC_MINALIGN to <linux/slab_def.h>") 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,
    this is kind of hokey that the FLAT is semi-abusing defines it shouldn't.
    
    So let's merge the two alignment requirements so the floor is never 0.
    
    Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
    Cc: David McCullough <davidm@snapgear.com>
    Cc: Greg Ungerer <gerg@uclinux.org>
    Cc: Paul Mundt <lethal@linux-sh...
    2952095c