• Nicolas Pitre's avatar
    ARM: vmlinux-xip.lds.S: fix multiple issues · 0d302c71
    Nicolas Pitre authored
    The XIP linker script has several problems:
    
    - PAGE_ALIGNED_DATA is missing and is likely to end up somewhere with
      the wrong LMA.
    
    - BUG_TABLE definitely has the wrong LMA, it is not copied to RAM, and
      its VMA is unaccounted for and likely to clash with dynamic memory
      usage.
    
    - TCM usage is similarly broken.
    
    - PERCPU_SECTION is left in ROM despite being written to.
    
    Let's use generic macros for those things and locate them appropriately.
    Incidentally, those macros are usable with a LMA != VMA already by
    properly defining LOAD_OFFSET.
    
    TCM is not fixed here. It never worked in a XIP configuration anyway, so
    that can wait until another round of cleanups.
    Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
    Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Tested-by: default avatarChris Brandt <Chris.Brandt@renesas.com>
    0d302c71
vmlinux-xip.lds.S 6.81 KB