]> git.sur5r.net Git - u-boot/commitdiff
arm: remove unneeded symbol offsets and _TEXT_BASE
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 22 Feb 2014 16:53:43 +0000 (17:53 +0100)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Wed, 26 Feb 2014 20:18:12 +0000 (21:18 +0100)
Remove the last uses of symbol offsets in ARM U-Boot.
Remove some needless uses of _TEXT_BASE.
Remove all _TEXT_BASE definitions.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
26 files changed:
README
arch/arm/cpu/arm1136/start.S
arch/arm/cpu/arm1176/start.S
arch/arm/cpu/arm720t/start.S
arch/arm/cpu/arm920t/start.S
arch/arm/cpu/arm926ejs/at91/lowlevel_init.S
arch/arm/cpu/arm926ejs/mxs/start.S
arch/arm/cpu/arm926ejs/start.S
arch/arm/cpu/arm946es/start.S
arch/arm/cpu/arm_intcm/start.S
arch/arm/cpu/armv7/omap3/lowlevel_init.S
arch/arm/cpu/armv7/start.S
arch/arm/cpu/pxa/start.S
arch/arm/cpu/sa1100/start.S
arch/arm/lib/board.c
board/armltd/integrator/lowlevel_init.S
board/cm4008/flash.c
board/cm41xx/flash.c
board/mpl/vcma9/lowlevel_init.S
board/samsung/goni/lowlevel_init.S
board/samsung/smdk2410/lowlevel_init.S
board/samsung/smdkc100/lowlevel_init.S
board/ti/omap5912osk/lowlevel_init.S
common/board_f.c
common/board_r.c
include/asm-generic/sections.h

diff --git a/README b/README
index d4eb0992a35795e44a69197885fdaa96f52ea6f4..5b7dec98f612d7c1fb9f673e0a9e5fd28f63cdcd 100644 (file)
--- a/README
+++ b/README
@@ -3707,12 +3707,6 @@ Configuration Settings:
        its config.mk file). If you find problems enabling this option on
        your board please report the problem and send patches!
 
-- CONFIG_SYS_SYM_OFFSETS
-       This is set by architectures that use offsets for link symbols
-       instead of absolute values. So bss_start is obtained using an
-       offset _bss_start_ofs from CONFIG_SYS_TEXT_BASE, rather than
-       directly. You should not need to touch this setting.
-
 - CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC (OMAP only)
        This is set by OMAP boards for the max time that reset should
        be asserted. See doc/README.omap-reset-time for details on how
index 00d1b30ba63bc3285b4c21a04e2bbb585c40416b..3e2358e132b0d37af789da5d7b2004df4c1070b7 100644 (file)
@@ -70,32 +70,6 @@ _end_vect:
  *************************************************************************
  */
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE)
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- * Subtracting _start from them lets the linker put their
- * relative position in the executable instead of leaving
- * them null.
- */
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
 .globl IRQ_STACK_START
@@ -295,7 +269,6 @@ cpu_init_crit:
 #ifdef CONFIG_SPL_BUILD
        .align  5
 do_hang:
-       ldr     sp, _TEXT_BASE                  /* use 32 words about stack */
        bl      hang                            /* hang and never return */
 #else  /* !CONFIG_SPL_BUILD */
        .align  5
index ffd7dd0dcd093c38a54c1b371045a015e5508372..ce620115d4d2963a2a5886d5e38244a901efffae 100644 (file)
@@ -77,33 +77,6 @@ _end_vect:
  *************************************************************************
  */
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE)
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- * Subtracting _start from them lets the linker put their
- * relative position in the executable instead of leaving
- * them null.
- */
-
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 /* IRQ stack memory (calculated at run-time) + 8 bytes */
 .globl IRQ_STACK_START_IN
 IRQ_STACK_START_IN:
index f180eb8aa69d612f4a1b9e9ce3a3a3e3c0fd4c09..1a34842690358c3c485f0d08dbc30d8a134a188b 100644 (file)
@@ -67,32 +67,6 @@ _pad:                        .word 0x12345678 /* now 16*4=64 */
  *************************************************************************
  */
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE)
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- * Subtracting _start from them lets the linker put their
- * relative position in the executable instead of leaving
- * them null.
- */
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
 .globl IRQ_STACK_START
index a67b659fd0796103124c436f0b6013ba84fa033f..7bf094aec133cae3738543e8b20a990cb376d5e6 100644 (file)
@@ -55,32 +55,6 @@ _fiq:                        .word fiq
  *************************************************************************
  */
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE)
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- * Subtracting _start from them lets the linker put their
- * relative position in the executable instead of leaving
- * them null.
- */
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
 .globl IRQ_STACK_START
index e83968fb7a66b96aefac46b56389b3b8f3c1c82c..a9ec81a75c81b31ec6d4c0609d4287da2aa7a741 100644 (file)
 #define CONFIG_SYS_MATRIX_EBICSA_VAL CONFIG_SYS_MATRIX_EBI0CSA_VAL
 #endif
 
-_TEXT_BASE:
-       .word   CONFIG_SYS_TEXT_BASE
-
 .globl lowlevel_init
 .type lowlevel_init,function
 lowlevel_init:
 
-       mov     r5, pc          /* r5 = POS1 + 4 current */
 POS1:
+       adr     r5, POS1        /* r5 = POS1 run time */
        ldr     r0, =POS1       /* r0 = POS1 compile */
-       ldr     r2, _TEXT_BASE
-       sub     r0, r0, r2      /* r0 = POS1-_TEXT_BASE (POS1 relative) */
        sub     r5, r5, r0      /* r0 = CONFIG_SYS_TEXT_BASE-1 */
-       sub     r5, r5, #4      /* r1 = text base - current */
 
        /* memory control configuration 1 */
        ldr     r0, =SMRDATA
        ldr     r2, =SMRDATA1
-       ldr     r1, _TEXT_BASE
-       sub     r0, r0, r1
-       sub     r2, r2, r1
        add     r0, r0, r5
        add     r2, r2, r5
 0:
@@ -149,9 +140,6 @@ PLL_setup_end:
 
        ldr     r0, =SMRDATA1
        ldr     r2, =SMRDATA2
-       ldr     r1, _TEXT_BASE
-       sub     r0, r0, r1
-       sub     r2, r2, r1
        add     r0, r0, r5
        add     r2, r2, r5
 2:
index 5de2bad5844018a334e596edbfe681e1eb5408b5..34a0fcb462f44539af65a13a8ce0b40e1ff79c99 100644 (file)
@@ -101,32 +101,6 @@ fiq:
  *************************************************************************
  */
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#ifdef CONFIG_SPL_TEXT_BASE
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- * Subtracting _start from them lets the linker put their
- * relative position in the executable instead of leaving
- * them null.
- */
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
 .globl IRQ_STACK_START
@@ -207,6 +181,5 @@ _reset:
        bx      lr
 
 _hang:
-       ldr     sp, _TEXT_BASE                  /* switch to abort stack */
 1:
        bl      1b                              /* hang and never return */
index 5360f55bc1a4251e9e3d56ba133854ec788b3153..0717327050d06200a2871da2bcccfb290a45d1d7 100644 (file)
@@ -102,32 +102,6 @@ _fiq:
  *************************************************************************
  */
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE)
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- * Subtracting _start from them lets the linker put their
- * relative position in the executable instead of leaving
- * them null.
- */
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
 .globl IRQ_STACK_START
@@ -330,7 +304,6 @@ flush_dcache:
 #ifdef CONFIG_SPL_BUILD
        .align  5
 do_hang:
-       ldr     sp, _TEXT_BASE                  /* switch to abort stack */
 1:
        bl      1b                              /* hang and never return */
 #else  /* !CONFIG_SPL_BUILD */
index e16b0881410ee5b2463c2b978e83d4c8f813f7ae..7d5014583626db38228f533913687c4e6df55b7f 100644 (file)
@@ -71,32 +71,6 @@ _vectors_end:
  *************************************************************************
  */
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE)
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- * Subtracting _start from them lets the linker put their
- * relative position in the executable instead of leaving
- * them null.
- */
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
 .globl IRQ_STACK_START
index 5783df1ef2a6986eccc27438955d99450f697680..7404ea734816b9d7e7c5dd4acfe6342bc2071dac 100644 (file)
@@ -67,32 +67,6 @@ _fiq:
  *************************************************************************
  */
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE)
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- * Subtracting _start from them lets the linker put their
- * relative position in the executable instead of leaving
- * them null.
- */
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
 .globl IRQ_STACK_START
index 6f7261b7b8ead7c91d760d039ba0f33584e31544..78577b1d1c75bc0632be5725fea1be4b2d0f8cad 100644 (file)
@@ -17,9 +17,6 @@
 #include <asm/arch/clocks_omap3.h>
 #include <linux/linkage.h>
 
-_TEXT_BASE:
-       .word   CONFIG_SYS_TEXT_BASE    /* sdram load addr from config.mk */
-
 #ifdef CONFIG_SPL_BUILD
 ENTRY(save_boot_params)
        ldr     r4, =omap3_boot_device
index 5aac7736444c5e7101d680478f23be93c16f7e38..ac1e55a708d7edb8a9e3d65202867b472aaf5096 100644 (file)
@@ -70,29 +70,6 @@ _end_vect:
  *
  *************************************************************************/
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE)
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- */
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
 .globl IRQ_STACK_START
index d8fb812dbf0f1c55a171ae2b11232949db3fd70f..ae0d13ce8fe449fb72c59f7b4df1504e7e1f5800 100644 (file)
@@ -84,32 +84,6 @@ _end_vect:
  *************************************************************************
  */
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE)
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- * Subtracting _start from them lets the linker put their
- * relative position in the executable instead of leaving
- * them null.
- */
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
 .globl IRQ_STACK_START
@@ -316,7 +290,6 @@ cpu_init_crit:
 #ifdef CONFIG_SPL_BUILD
        .align  5
 do_hang:
-       ldr     sp, _TEXT_BASE                  /* use 32 words about stack */
        bl      hang                            /* hang and never return */
 #else  /* !CONFIG_SPL_BUILD */
        .align  5
index 27bcda598c65bb7786452df169d1d61a2f5dae0c..bf80937a7c7b42f5d8a82ed388f8fd389b4580ed 100644 (file)
@@ -56,32 +56,6 @@ _fiq:                        .word fiq
  *************************************************************************
  */
 
-.globl _TEXT_BASE
-_TEXT_BASE:
-#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_TEXT_BASE)
-       .word   CONFIG_SPL_TEXT_BASE
-#else
-       .word   CONFIG_SYS_TEXT_BASE
-#endif
-
-/*
- * These are defined in the board-specific linker script.
- * Subtracting _start from them lets the linker put their
- * relative position in the executable instead of leaving
- * them null.
- */
-.globl _bss_start_ofs
-_bss_start_ofs:
-       .word __bss_start - _start
-
-.globl _bss_end_ofs
-_bss_end_ofs:
-       .word __bss_end - _start
-
-.globl _end_ofs
-_end_ofs:
-       .word _end - _start
-
 #ifdef CONFIG_USE_IRQ
 /* IRQ stack memory (calculated at run-time) */
 .globl IRQ_STACK_START
index c320a35166b82009a7cc623b7460754294bf3ba5..1de58122e4063300dccb3d0f0d16dd065a80400f 100644 (file)
@@ -105,8 +105,8 @@ static int display_banner(void)
 {
        printf("\n\n%s\n\n", version_string);
        debug("U-Boot code: %08lX -> %08lX  BSS: -> %08lX\n",
-              _TEXT_BASE,
-              _bss_start_ofs + _TEXT_BASE, _bss_end_ofs + _TEXT_BASE);
+              (ulong)&_start,
+              (ulong)&__bss_start, (ulong)&__bss_end);
 #ifdef CONFIG_MODEM_SUPPORT
        debug("Modem Support enabled\n");
 #endif
@@ -273,13 +273,13 @@ void board_init_f(ulong bootflag)
 
        memset((void *)gd, 0, sizeof(gd_t));
 
-       gd->mon_len = _bss_end_ofs;
+       gd->mon_len = (ulong)&__bss_end - (ulong)_start;
 #ifdef CONFIG_OF_EMBED
        /* Get a pointer to the FDT */
        gd->fdt_blob = __dtb_db_begin;
 #elif defined CONFIG_OF_SEPARATE
        /* FDT is at end of image */
-       gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE);
+       gd->fdt_blob = &_end;
 #endif
        /* Allow the early environment to override the fdt address */
        gd->fdt_blob = (void *)getenv_ulong("fdtcontroladdr", 16,
@@ -451,7 +451,7 @@ void board_init_f(ulong bootflag)
 
        gd->relocaddr = addr;
        gd->start_addr_sp = addr_sp;
-       gd->reloc_off = addr - _TEXT_BASE;
+       gd->reloc_off = addr - (ulong)&_start;
        debug("relocation Offset is: %08lx\n", gd->reloc_off);
        if (new_fdt) {
                memcpy(new_fdt, gd->fdt_blob, fdt_size);
@@ -516,7 +516,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
        gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */
        bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r");
 
-       monitor_flash_len = _end_ofs;
+       monitor_flash_len = (ulong)&__rel_dyn_end - (ulong)_start;
 
        /* Enable caches */
        enable_caches();
index 389d5e90836ea76edfbee1bc375df51091fb0a83..0fb42adc6fe1b7ee42806b3aa369933c91d56f67 100644 (file)
@@ -183,7 +183,7 @@ cm_remap:
 
        /* Now 0x00000000 is writeable, replace the vectors     */
        ldr     r0, =_start     /* r0 <- start of vectors       */
-       ldr     r2, =_TEXT_BASE /* r2 <- past vectors   */
+       add     r2, r0, #64     /* r2 <- past vectors   */
        sub     r1,r1,r1                /* destination 0x00000000       */
 
 copy_vec:
index 251192839e73c31ffd88998f25187ac5bdb67c0c..8315a57ed9ace6bd30f375055a11d9aa812fa0e3 100644 (file)
@@ -57,7 +57,7 @@ unsigned long flash_init (void)
         */
        flash_protect (FLAG_PROTECT_SET,
                       CONFIG_SYS_FLASH_BASE,
-                      CONFIG_SYS_FLASH_BASE + _bss_start_ofs,
+                      CONFIG_SYS_FLASH_BASE + (__bss_end - __bss_start),
                       &flash_info[0]);
 
        return size;
index 251192839e73c31ffd88998f25187ac5bdb67c0c..8315a57ed9ace6bd30f375055a11d9aa812fa0e3 100644 (file)
@@ -57,7 +57,7 @@ unsigned long flash_init (void)
         */
        flash_protect (FLAG_PROTECT_SET,
                       CONFIG_SYS_FLASH_BASE,
-                      CONFIG_SYS_FLASH_BASE + _bss_start_ofs,
+                      CONFIG_SYS_FLASH_BASE + (__bss_end - __bss_start),
                       &flash_info[0]);
 
        return size;
index b889cf94af6122bb3d0f7aa714619348dff66876..cca9c0c880bc95338b3339b3a009c9b86e167eea 100644 (file)
 #define REFCNT_266             0
 /**************************************/
 
-_TEXT_BASE:
-       .word   CONFIG_SYS_TEXT_BASE
-
 .globl lowlevel_init
 lowlevel_init:
        /* use r0 to relocate DATA read/write to flash rather than memory ! */
-       ldr     r0, _TEXT_BASE
+       ldr     r0, =CONFIG_SYS_TEXT_BASE
        ldr     r13, =BWSCON
 
        /* enable minimal access to PLD */
index 726211a336e7a5b2dc1a916801f237fe864edf03..d52bc09f8d27d088af2fc98768fe67fdded359d6 100644 (file)
@@ -22,9 +22,6 @@
  * r9 has Mobile DDR size, 1 means 1GiB, 2 means 2GiB and so on
  */
 
-_TEXT_BASE:
-       .word   CONFIG_SYS_TEXT_BASE
-
        .globl lowlevel_init
 lowlevel_init:
        mov     r11, lr
index c7b78fd103e9507e117b94fb56f7cc1f1662e2b4..5de04f10e9a2b7572143e927a670ce7be661e877 100644 (file)
 #define REFCNT                 1113    /* period=15.6us, HCLK=60Mhz, (2048+1-15.6*60) */
 /**************************************/
 
-_TEXT_BASE:
-       .word   CONFIG_SYS_TEXT_BASE
-
 .globl lowlevel_init
 lowlevel_init:
        /* memory control configuration */
        /* make r0 relative the current location so that it */
        /* reads SMRDATA out of FLASH rather than memory ! */
        ldr     r0, =SMRDATA
-       ldr     r1, _TEXT_BASE
+       ldr     r1, =CONFIG_SYS_TEXT_BASE
        sub     r0, r0, r1
        ldr     r1, =BWSCON     /* Bus Width Status Controller */
        add     r2, r0, #13*4
index 4df0974af5896e0258654d5cd5e92d752ae15867..65e6b7a73a8dfae471e6f1404604a8f0b5f2d82e 100644 (file)
@@ -17,9 +17,6 @@
  * r5 has zero always
  */
 
-_TEXT_BASE:
-       .word   CONFIG_SYS_TEXT_BASE
-
        .globl lowlevel_init
 lowlevel_init:
        mov     r9, lr
index cad0a5acd87eab692c3b2617f3a52480b2c8241b..e05a1c7b5572f8ed5527a4b802385c4481de182b 100644 (file)
 #include <./configs/omap1510.h>
 #endif
 
-
-_TEXT_BASE:
-       .word   CONFIG_SYS_TEXT_BASE    /* sdram load addr from config.mk */
-
 .globl lowlevel_init
 lowlevel_init:
 
index 02965b0df76a36a2218264d82365d087816d831f..5b9ba07d636703fddcd9433bca2a51b46985f1ee 100644 (file)
@@ -149,13 +149,9 @@ static int display_text_info(void)
 #ifndef CONFIG_SANDBOX
        ulong bss_start, bss_end;
 
-#ifdef CONFIG_SYS_SYM_OFFSETS
-       bss_start = _bss_start_ofs + _TEXT_BASE;
-       bss_end = _bss_end_ofs + _TEXT_BASE;
-#else
        bss_start = (ulong)&__bss_start;
        bss_end = (ulong)&__bss_end;
-#endif
+
        debug("U-Boot code: %08X -> %08lX  BSS: -> %08lX\n",
              CONFIG_SYS_TEXT_BASE, bss_start, bss_end);
 #endif
@@ -279,8 +275,8 @@ static int zero_global_data(void)
 
 static int setup_mon_len(void)
 {
-#ifdef CONFIG_SYS_SYM_OFFSETS
-       gd->mon_len = _bss_end_ofs;
+#ifdef __ARM__
+       gd->mon_len = (ulong)&__bss_end - (ulong)_start;
 #elif defined(CONFIG_SANDBOX)
        gd->mon_len = (ulong)&_end - (ulong)_init;
 #else
@@ -363,11 +359,7 @@ static int setup_fdt(void)
        gd->fdt_blob = __dtb_dt_begin;
 #elif defined CONFIG_OF_SEPARATE
        /* FDT is at end of image */
-# ifdef CONFIG_SYS_SYM_OFFSETS
-       gd->fdt_blob = (void *)(_end_ofs + CONFIG_SYS_TEXT_BASE);
-# else
        gd->fdt_blob = (ulong *)&_end;
-# endif
 #elif defined(CONFIG_OF_HOSTFILE)
        if (read_fdt_from_file()) {
                puts("Failed to read control FDT\n");
index c2d0763b5761a8ef0dcfcfd3a39e5ccf7803fdb4..899f377e174fd1aa0223b98b0fcdd8cdc48300e5 100644 (file)
@@ -128,8 +128,8 @@ __weak int fixup_cpu(void)
 
 static int initr_reloc_global_data(void)
 {
-#ifdef CONFIG_SYS_SYM_OFFSETS
-       monitor_flash_len = _end_ofs;
+#ifdef __ARM__
+       monitor_flash_len = _end - __image_copy_start;
 #elif !defined(CONFIG_SANDBOX)
        monitor_flash_len = (ulong)&__init_end - gd->relocaddr;
 #endif
index 7e1eb4bf5e08018f0d32a6cff58509f17af2aa68..458952fb58c6cc67c26e5e0c9cb17c21108ee4b8 100644 (file)
@@ -63,28 +63,16 @@ extern char __image_copy_end[];
 extern void _start(void);
 
 /*
- * ARM needs to use offsets for symbols, since the values of some symbols
- * are not resolved prior to relocation (and are just 0). Maybe this can be
- * resolved, or maybe other architectures are similar, iwc this should be
- * promoted to an architecture option.
+ * ARM defines its symbols as char[]. Other arches define them as ulongs.
  */
 #ifdef CONFIG_ARM
-#define CONFIG_SYS_SYM_OFFSETS
-#endif
-
-#ifdef CONFIG_SYS_SYM_OFFSETS
-/* Start/end of the relocation entries, as an offset from _start */
-extern ulong _rel_dyn_start_ofs;
-extern ulong _rel_dyn_end_ofs;
-
-/* End of the region to be relocated, as an offset form _start */
-extern ulong _image_copy_end_ofs;
 
-extern ulong _bss_start_ofs;   /* BSS start relative to _start */
-extern ulong _bss_end_ofs;             /* BSS end relative to _start */
-extern ulong _end_ofs;         /* end of image relative to _start */
-
-extern ulong _TEXT_BASE;       /* code start */
+extern char __bss_start[];
+extern char __bss_end[];
+extern char __image_copy_start[];
+extern char __image_copy_end[];
+extern char __rel_dyn_start[];
+extern char __rel_dyn_end[];
 
 #else /* don't use offsets: */