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>
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index 267f1db..1e1657a 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -61,8 +61,12 @@
 /* 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 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_ */