treewide: rework linker symbol declarations in sections header
authorShiji Yang <yangshiji66@outlook.com>
Thu, 3 Aug 2023 01:47:16 +0000 (09:47 +0800)
committerTom Rini <trini@konsulko.com>
Wed, 9 Aug 2023 13:21:42 +0000 (09:21 -0400)
commit506df9dc5881b74ca6463b89e9edcd14732a7da5
tree3b3fdb9ac6af400dd400c99b47f9c356012588bc
parenta077ac13d03c8cde646ddab30b03ec0f8b753e1e
treewide: rework linker symbol declarations in sections header

1. Convert all linker symbols to char[] type so that we can get the
   corresponding address by calling array name 'var' or its address
   '&var'. In this way, we can avoid some potential issues[1].
2. Remove unused symbol '_TEXT_BASE'. It has been abandoned and has
   not been referenced by any source code.
3. Move '__data_end' to the arch x86's own sections header as it's
   only used by x86 arch.
4. Remove some duplicate declared linker symbols. Now we use the
   standard header file to declare them.

[1] This patch fixes the boot failure on MIPS target. Error log:
SPL: Image overlaps SPL

Fixes: 1b8a1be1a1f1 ("spl: spl_legacy: Fix spl_end address")
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
58 files changed:
arch/arc/include/asm/sections.h
arch/arc/lib/relocate.c
arch/arm/include/asm/spl.h
arch/microblaze/include/asm/processor.h
arch/x86/include/asm/sections.h
board/advantech/imx8qm_dmsse20_a1/spl.c
board/advantech/imx8qm_rom7720_a1/spl.c
board/aristainetos/aristainetos.c
board/beacon/imx8mm/spl.c
board/beacon/imx8mn/spl.c
board/bosch/acc/acc.c
board/bsh/imx8mn_smm_s2/spl.c
board/cloos/imx8mm_phg/spl.c
board/compulab/cl-som-imx7/spl.c
board/compulab/imx8mm-cl-iot-gate/spl.c
board/congatec/cgtqmx8/spl.c
board/dhelectronics/dh_imx6/dh_imx6_spl.c
board/dhelectronics/dh_imx8mp/spl.c
board/engicam/imx8mm/spl.c
board/freescale/imx8mm_evk/spl.c
board/freescale/imx8mn_evk/spl.c
board/freescale/imx8mq_evk/spl.c
board/freescale/imx8qm_mek/spl.c
board/freescale/imx8qxp_mek/spl.c
board/freescale/imx8ulp_evk/spl.c
board/freescale/imx93_evk/spl.c
board/freescale/ls1021aiot/ls1021aiot.c
board/freescale/ls1021aqds/ls1021aqds.c
board/freescale/ls1021atsn/ls1021atsn.c
board/freescale/ls1021atwr/ls1021atwr.c
board/freescale/mx6sabreauto/mx6sabreauto.c
board/freescale/mx6sabresd/mx6sabresd.c
board/freescale/mx6slevk/mx6slevk.c
board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
board/gateworks/venice/spl.c
board/k+p/kp_imx6q_tpc/kp_imx6q_tpc_spl.c
board/kontron/pitx_imx8m/spl.c
board/kontron/sl-mx6ul/spl.c
board/kontron/sl-mx8mm/spl.c
board/liebherr/display5/spl.c
board/mntre/imx8mq_reform2/spl.c
board/phytec/pcm058/pcm058.c
board/phytec/phycore_imx8mm/spl.c
board/ronetix/imx7-cm/spl.c
board/ronetix/imx8mq-cm/spl.c
board/siemens/capricorn/spl.c
board/softing/vining_2000/vining_2000.c
board/solidrun/mx6cuboxi/mx6cuboxi.c
board/technexion/pico-imx6ul/spl.c
board/technexion/pico-imx7d/spl.c
board/technexion/pico-imx8mq/spl.c
board/toradex/apalis_imx6/apalis_imx6.c
board/toradex/colibri_imx6/colibri_imx6.c
board/toradex/verdin-imx8mm/spl.c
board/udoo/neo/neo.c
board/variscite/dart_6ul/spl.c
board/variscite/imx8mn_var_som/spl.c
include/asm-generic/sections.h