ARM: vmlinux-xip.lds.S: fix multiple issues
authorNicolas Pitre <nicolas.pitre@linaro.org>
Tue, 29 Aug 2017 21:58:41 +0000 (17:58 -0400)
committerNicolas Pitre <nicolas.pitre@linaro.org>
Sun, 10 Sep 2017 23:34:52 +0000 (19:34 -0400)
commit0d302c710bf04149b6de7cd9a7064d0ca6cd4bea
treecf868f1b512045b1f8b257618b82a41758f2a418
parent861e37da6a06c867b51528066cad84c0fb90cc0c
ARM: vmlinux-xip.lds.S: fix multiple issues

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: Nicolas Pitre <nico@linaro.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Chris Brandt <Chris.Brandt@renesas.com>
arch/arm/kernel/vmlinux-xip.lds.S