]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
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)
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

index 1c9c9db13868e30ad640b073607c7afa4f4b57f2..ffad4a684ef6668ee24f3c4783b6d09722a033cd 100644 (file)
@@ -8,7 +8,8 @@
 
 #include <asm-generic/sections.h>
 
-extern ulong __ivt_start;
-extern ulong __ivt_end;
+extern char __ivt_start[];
+extern char __ivt_end[];
+extern char __text_end[];
 
 #endif /* __ASM_ARC_SECTIONS_H */
index 7f531c95eec654cd11b484cbd963b25b2a61d148..682e274f9bcf477839f1c21c61ac126e122fca03 100644 (file)
@@ -6,14 +6,9 @@
 #include <common.h>
 #include <elf.h>
 #include <log.h>
-#include <asm-generic/sections.h>
+#include <asm/sections.h>
 #include <asm/global_data.h>
 
-extern ulong __image_copy_start;
-extern ulong __ivt_start;
-extern ulong __ivt_end;
-extern ulong __text_end;
-
 DECLARE_GLOBAL_DATA_PTR;
 
 int copy_uboot_to_ram(void)
index 0ece4b09060a3c94d11324df363f0cb38c4bea9e..ee79a19c05c986ad7904e520593e43276a4c105e 100644 (file)
@@ -34,9 +34,6 @@ enum {
 };
 #endif
 
-/* Linker symbols. */
-extern char __bss_start[], __bss_end[];
-
 #ifndef CONFIG_DM
 extern gd_t gdata;
 #endif
index 958018c1909e010b5505784c32c656dec17f1b2e..c0423eaf93a4fab7a17c6e3a63de293109233c81 100644 (file)
@@ -6,11 +6,6 @@
 #ifndef __ASM_MICROBLAZE_PROCESSOR_H
 #define __ASM_MICROBLAZE_PROCESSOR_H
 
-/* References to section boundaries */
-
-extern char _end[];
-extern char __text_start[];
-
 /* Microblaze board initialization function */
 void board_init(void);
 
index a6be3604e9b985e45902a2038025ee510176ef1a..874a43d16c767f68e10a88b56f1e7f5aa503dc23 100644 (file)
@@ -8,4 +8,6 @@
 
 #include <asm-generic/sections.h>
 
+extern char __data_end[];
+
 #endif
index f36caece7d7776a45e630e9e1c527d2bef857adf..e8959ede51d9cf0daf0e67493e088937cf35d266 100644 (file)
@@ -14,6 +14,7 @@
 #include <firmware/imx/sci/sci.h>
 #include <asm/arch/imx8-pins.h>
 #include <asm/arch/iomux.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 
 DECLARE_GLOBAL_DATA_PTR;
index 922bb0b7d434b96b1954b3cbfbca2fe8dd558d75..d32400101fc9311cda312e7a80f283bac9ab61e3 100644 (file)
@@ -17,6 +17,7 @@
 #include <firmware/imx/sci/sci.h>
 #include <asm/arch/imx8-pins.h>
 #include <asm/arch/iomux.h>
+#include <asm/sections.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 4dcf3f396b8ea85e5304799eeaac880bd3187a4b..17f37badd746072786883ae3ccfb4d72f4132848 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/arch/crm_regs.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/sections.h>
 #include <bmp_logo.h>
 #include <dm/root.h>
 #include <env.h>
@@ -216,7 +217,6 @@ static void set_gpr_register(void)
               &iomuxc_regs->gpr[12]);
 }
 
-extern char __bss_start[], __bss_end[];
 int board_early_init_f(void)
 {
        select_ldb_di_clock_source(MXC_PLL5_CLK);
index b2830c5223a10c3556d27e761297bce2d0ab315f..1632238bf5dd5f3e5a21f03226cbfc17bbbc5e8e 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/arch/ddr.h>
+#include <asm/sections.h>
 
 #include <dm/uclass.h>
 #include <dm/device.h>
index 9acd9161800875be5a65e64186dd8df9935af6a4..b4d46f11f98d251665c69f77027aa8b57cf4528d 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 #include <mmc.h>
 #include <linux/delay.h>
index 7c49b206c1526d99d860b2a6252defebc3aa8c6c..34088adee47bd9c4ce41c678c2c29e30b6da9030 100644 (file)
@@ -27,6 +27,7 @@
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/iomux-v3.h>
+#include <asm/sections.h>
 #include <usb.h>
 #include <usb/ehci-ci.h>
 #include <fuse.h>
index ce0504a011af68764d52cd8b4f4c1972b032e938..5a77d28cb7e121de431af6d6d9531e6e96b44872 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/gpio.h>
+#include <asm/sections.h>
 #include <dm/device.h>
 #include <dm/uclass.h>
 
index e63904eade88be9625033b78393088cbef33529b..0c3a0135a8600432e8fbd532837cf36748fcee08 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/arch/ddr.h>
+#include <asm/sections.h>
 
 #include <dm/uclass.h>
 #include <dm/device.h>
index 5d4c4d39e724ded70893f00cfe77aeeb02125a92..98c3b831f1e1aca28d3968c8e790737dacef4c7d 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/arch-mx7/mx7-pins.h>
 #include <asm/arch-mx7/clock.h>
 #include <asm/arch-mx7/mx7-ddr.h>
+#include <asm/sections.h>
 #include "common.h"
 
 #ifdef CONFIG_FSL_ESDHC_IMX
index d2d20269ba07ea1df40071dc9ab010c2482f67d3..19c1acd8a5254da7bcd8348da2e7cec62cca574f 100644 (file)
@@ -21,6 +21,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/arch/ddr.h>
+#include <asm/sections.h>
 
 #include <dm/uclass.h>
 #include <dm/device.h>
index dea34e4dc63cd85048913279a98d5d46c599c353..b432ce27459f60e3773a690880a60a0c136d26a8 100644 (file)
@@ -10,6 +10,7 @@
 #include <init.h>
 #include <log.h>
 #include <spl.h>
+#include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
 #include <dm/uclass-internal.h>
index 20a330cce62f62030bf33b4422f0d66f80ecc8b5..e6d5657c62d00f52a00cae34b207bab851f61bed 100644 (file)
@@ -21,6 +21,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/io.h>
+#include <asm/sections.h>
 #include <asm/system.h>
 #include <errno.h>
 #include <fuse.h>
index e2aa874723a76e1980db081b573943563cd7e5fe..a8fda139aa4d5a3a2a79ddb19a0bf9afb55f44a4 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/arch/ddr.h>
+#include <asm/sections.h>
 
 #include <dm/uclass.h>
 #include <dm/device.h>
index 1846134a49255dc5c3fb125ed4980a4dcf6727b8..af9044a3c2b036d5a5e04ae869796f1899b109e6 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/arch/ddr.h>
+#include <asm/sections.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 6e9513805cdd49a176ee7e673a3ab6d94e8a0e56..35437811d9df7c8e343dbf9057412f04d6d78fe6 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/arch/ddr.h>
+#include <asm/sections.h>
 
 #include <dm/uclass.h>
 #include <dm/device.h>
index ec0378b5b7688ecdc2eb9d74f7abfa8d62a4897e..dd54fa9b6085bb288c2782395f032c9ee754d48d 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/arch/ddr.h>
+#include <asm/sections.h>
 
 #include <dm/uclass.h>
 #include <dm/device.h>
index bea9ddc996048cb208cc454236c0a259943fa2d0..818cdd615eb9a3c28c1a5229e29596a1e4df9667 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 #include <fsl_sec.h>
 #include <mmc.h>
index 332a662dee843353f7d7729ceb0710e42859eb15..17fd437116d35da1544163e13414ab19b76ebad6 100644 (file)
@@ -17,6 +17,7 @@
 #include <dm/device-internal.h>
 #include <dm/lists.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/sections.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 75aab1651c0acb2558f3d6e37632e33d0a7e2b83..462c43ceebc75b864d2001c10dd01e77846d58d4 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/arch/imx8-pins.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/sections.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 66d0f68cc62de59997015199a80ec2a9849ef1e3..c49b5be4762052ca7754471779e4032632e6161b 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/arch/rdc.h>
 #include <asm/arch/upower.h>
 #include <asm/mach-imx/ele_api.h>
+#include <asm/sections.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
index 63883b30dd794ca2f4820a81c91bcc3f895ff4bb..be9c24fc0d9165efc2ee14043ae7515ad1fa7e72 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/arch-mx7ulp/gpio.h>
 #include <asm/mach-imx/syscounter.h>
+#include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
 #include <dm/uclass-internal.h>
index 8605d064138a7e8bd6df6bb929463b8cbab0b4de..d6f22bd6a2a3c0d406174eb0f77a8797bc8cce5a 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <asm/arch/ls102xa_devdis.h>
 #include <asm/arch/ls102xa_soc.h>
+#include <asm/sections.h>
 #include <fsl_csu.h>
 #include <fsl_immap.h>
 #include <netdev.h>
index d5cb7312095ac67375c37b7caec5f57539346bc6..a618ce11a584a432b21fb94be6c24aaf73fd72be 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/ls102xa_soc.h>
 #include <asm/arch/ls102xa_devdis.h>
+#include <asm/sections.h>
 #include <hwconfig.h>
 #include <mmc.h>
 #include <fsl_csu.h>
index d144f25c623c0c5f2d2391f08af42cec538d61c5..d0e4e796c6062ba65c0f9bf4806638cd0494adcc 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/arch/ls102xa_soc.h>
 #include <asm/arch/fsl_serdes.h>
 #include <asm/global_data.h>
+#include <asm/sections.h>
 #include <linux/delay.h>
 #include "../common/sleep.h"
 #include <fsl_validate.h>
index 4f5834347db484bbd1f668016f2d8e10b51a22a4..27b9d79e5f0bb874f3df05fa3f8d12b54757fc0f 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/arch/fsl_serdes.h>
 #include <asm/arch/ls102xa_devdis.h>
 #include <asm/arch/ls102xa_soc.h>
+#include <asm/sections.h>
 #include <hwconfig.h>
 #include <mmc.h>
 #include <fsl_csu.h>
index 039deb5bf94c09041b772e31efe2ba52ea996c22..77e92006131a7e10d2db107767a3dec1020b62af 100644 (file)
@@ -15,6 +15,7 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/iomux.h>
 #include <asm/arch/mx6-pins.h>
+#include <asm/sections.h>
 #include <env.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
index 96a76b0581c2e4bbc3b3b29ca9a91c8fbb59de67..b558a596dff8a9c225c1eb0d0b67d90a73dc4930 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/arch/mx6-pins.h>
 #include <asm/global_data.h>
 #include <asm/mach-imx/spi.h>
+#include <asm/sections.h>
 #include <env.h>
 #include <linux/errno.h>
 #include <asm/gpio.h>
index 2c90a35e2c9549c9633b042299204e4cd1144714..e9ac57118b0191cf3537bb71499c1e143c3d60e6 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/io.h>
+#include <asm/sections.h>
 #include <linux/sizes.h>
 #include <common.h>
 #include <fsl_esdhc_imx.h>
index 570b5014dbb1180852713bdb265ec5574ebf139c..534b16cec7ae87abb916992b551eacc7b2e5ac93 100644 (file)
@@ -18,6 +18,7 @@
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/io.h>
+#include <asm/sections.h>
 #include <common.h>
 #include <env.h>
 #include <fsl_esdhc_imx.h>
index 5aa209578b21db82ee467a42e9a7e1e44afa4d32..774a99041c8a18509cddaaf746bb502a2270df47 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/arch/ddr.h>
 #include <asm-generic/gpio.h>
+#include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
 #include <dm/pinctrl.h>
index 103c4531a64c850295d5f1aa0c175574a8be22bc..54902437940bb9e46a9c4fdbd2a5574e0a30a1d0 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/arch/mx6-ddr.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/global_data.h>
+#include <asm/sections.h>
 #include <asm/io.h>
 #include <errno.h>
 #include <spl.h>
index f6fd17048d04de6a9d79db51668ff5e1b3d938d6..a247803a4b469bffcddb6dac3a50eac1247f83d0 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
+#include <asm/sections.h>
 #include <linux/delay.h>
 #include <power/pmic.h>
 #include <power/pfuze100_pmic.h>
index a9d370bc854c4fae924b93e5cdbcacf4f33ec3eb..b175885870557475cc97257e007d8443841dfccb 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/gpio.h>
 #include <asm/io.h>
 #include <asm/mach-imx/iomux-v3.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 #include <init.h>
 #include <linux/delay.h>
index b49373442a2ce980e69bd8b7a9c089acd3708a9f..54ee1e66a7a4ec265183d7fa29d6203cf2645f39 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/gpio.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/iomux-v3.h>
+#include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
 #include <dm/uclass-internal.h>
index 4219d002fec5eba122d492e6347e5011dc634eca..97928e92215c34dfeb1b2e7954fe065fbba87b0f 100644 (file)
@@ -25,6 +25,7 @@
 #include "asm/arch/iomux.h"
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/gpio.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 #include <netdev.h>
 #include <bootcount.h>
index 21fad4972ab8317e835957323b947c53a6241034..5120c628b91a1a701761852a42416dd10dd37c81 100644 (file)
@@ -21,6 +21,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 #include <mmc.h>
 #include <linux/delay.h>
index 5e5b129ef1ff3090339d9bbf9e07a0272b90e24f..b37c6fe218da48a6ca5b4da478a66f72ca5a9081 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/arch/sys_proto.h>
+#include <asm/sections.h>
 #include <dm.h>
 
 DECLARE_GLOBAL_DATA_PTR;
index 1bae9b1170ddbc6db8086e95788ae98a4379e377..690a51f7a72e917095cbb7b9ee0e7075a41408e3 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/global_data.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/iomux-v3.h>
+#include <asm/sections.h>
 #include <hang.h>
 #include <init.h>
 #include <log.h>
index d36f734e49cdda356db76b1affd966721820274f..b94cfd6ffc6761adafab04aa12f836974aa84f91 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/arch-mx7/mx7-ddr.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/gpio.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 #include <spl.h>
 
index b9a67451aecca37eb0d75502fcb006985cede2ea..1c675bcab25a5b4860b916fa947b7a917afb6785 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/arch/clock.h>
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/mxc_i2c.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 #include <linux/delay.h>
 #include <spl.h>
index 8e077d73aef97df2291491d94ebedb8704b986f6..e160c611a962142d0c624feea70fd60bb4fc6203 100644 (file)
@@ -10,6 +10,7 @@
 #include <spl.h>
 #include <dm.h>
 #include <asm/global_data.h>
+#include <asm/sections.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
 #include <dm/uclass-internal.h>
index aaeeee361e54b0950a1cfdd85b58323cb02f91cb..4483bd7f7a3829fb05b545c5c8cefd776c6f5069 100644 (file)
@@ -19,6 +19,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/io.h>
 #include <asm/mach-imx/mxc_i2c.h>
+#include <asm/sections.h>
 #include <env.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
index 6fa5cf4d27d773c18fa3b038096d0ee3248cee42..e119330bc0c14a95c53e88f820765da001e5481a 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/sata.h>
 #include <asm/mach-imx/video.h>
+#include <asm/sections.h>
 #include <mmc.h>
 #include <fsl_esdhc_imx.h>
 #include <malloc.h>
index 251f5a1b7d04a1d6423b861533f85d6f425c9d14..ff56fd88d68ed21fea9382488cd5698b7e47da6a 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/boot_mode.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 #include <linux/libfdt.h>
 #include <spl.h>
index f86fee9c88ebfb645f54b83ade782eadd1683e1d..c6b21aaa42da655298eba5bea75dbfe2e24a1b22 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/arch-mx7/mx7-ddr.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/gpio.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 #include <spl.h>
 
index 2afb4d376088a72aeab1bedae33b350e917534ce..1a9c7996cb2a8a9c7210d2d089a7f11d95353758 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/mach-imx/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/mxc_i2c.h>
+#include <asm/sections.h>
 #include <linux/delay.h>
 #include <errno.h>
 #include <fsl_esdhc_imx.h>
index 3c7cfa309c13e799c89c275347071df8fc7b3498..fa6b7226fedfe3c750b8779bc8e3d949af001964 100644 (file)
@@ -30,6 +30,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/sata.h>
 #include <asm/mach-imx/video.h>
+#include <asm/sections.h>
 #include <dm/device-internal.h>
 #include <dm/platform_data/serial_mxc.h>
 #include <dwc_ahsata.h>
index 677caa4a4ebcb3c80085f924e765989d3116493e..e6c9b10570d19959a531b64b15647e3e025a62b5 100644 (file)
@@ -29,6 +29,7 @@
 #include <asm/mach-imx/iomux-v3.h>
 #include <asm/mach-imx/sata.h>
 #include <asm/mach-imx/video.h>
+#include <asm/sections.h>
 #include <cpu.h>
 #include <dm/platform_data/serial_mxc.h>
 #include <fsl_esdhc_imx.h>
index 9d54d60bb17d4b0981559a7e448298e41454d9c3..afa3686083a44173fde5b8c0bafef1304fa99d63 100644 (file)
@@ -16,6 +16,7 @@
 #include <asm/io.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/iomux-v3.h>
+#include <asm/sections.h>
 #include <cpu_func.h>
 #include <dm/device.h>
 #include <dm/device-internal.h>
index 1287f719197617b7394a56ae4b3f13c770005ee2..730e266469b22b9b551707231fcb2b603da5793a 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/global_data.h>
 #include <asm/gpio.h>
 #include <asm/mach-imx/iomux-v3.h>
+#include <asm/sections.h>
 #include <dm.h>
 #include <env.h>
 #include <mmc.h>
index 17b1ae748846b7a34c3a85bb65c06f19ebc2fe83..1dff69c82771f5d0e69cd257a8c6ca2f596c4207 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/arch/mx6-ddr.h>
 #include <asm/arch/mx6-pins.h>
 #include <asm/arch/crm_regs.h>
+#include <asm/sections.h>
 #include <fsl_esdhc_imx.h>
 
 #define UART_PAD_CTRL  (PAD_CTL_PKE | PAD_CTL_PUE |            \
index 41e70505774d7f2f807ff9cbdeae9f58a191f143..01a63c69641fa1cf275397c2f81701e07cf64197 100644 (file)
@@ -13,6 +13,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/gpio.h>
+#include <asm/sections.h>
 #include <dm/device.h>
 #include <dm/uclass.h>
 
index 267f1db73f238e18e5acb5a01890733e656a4221..1e1657a01673168bf59b7acbb8f6505e410e8b19 100644 (file)
@@ -61,8 +61,12 @@ static inline int arch_is_kernel_data(unsigned long addr)
 /* Start of U-Boot text region */
 extern char __text_start[];
 
-/* This marks the end of the text region which must be relocated */
-extern char __image_copy_end[];
+/* This marks the text region which must be relocated */
+extern char __image_copy_start[], __image_copy_end[];
+
+extern char __bss_end[];
+extern char __rel_dyn_start[], __rel_dyn_end[];
+extern char _image_binary_end[];
 
 /*
  * This is the U-Boot entry point - prior to relocation it should be same
@@ -70,30 +74,4 @@ extern char __image_copy_end[];
  */
 extern void _start(void);
 
-/*
- * ARM defines its symbols as char[]. Other arches define them as ulongs.
- */
-#ifdef CONFIG_ARM
-
-extern char __bss_start[];
-extern char __bss_end[];
-extern char __image_copy_start[];
-extern char __image_copy_end[];
-extern char _image_binary_end[];
-extern char __rel_dyn_start[];
-extern char __rel_dyn_end[];
-
-#else /* don't use offsets: */
-
-/* Exports from the Linker Script */
-extern ulong __data_end;
-extern ulong __rel_dyn_start;
-extern ulong __rel_dyn_end;
-extern ulong __bss_end;
-extern ulong _image_binary_end;
-
-extern ulong _TEXT_BASE;       /* code start */
-
-#endif
-
 #endif /* _ASM_GENERIC_SECTIONS_H_ */