Commit 44c6e659 authored by Po-Yu Chuang's avatar Po-Yu Chuang Committed by Albert Aribaud

rename _end to __bss_end__

Currently, _end is used for end of BSS section.  We want _end to mean
end of u-boot image, so we rename _end to __bss_end__ first.
Signed-off-by: default avatarPo-Yu Chuang <ratbert@faraday-tech.com>
parent 55f7934d
......@@ -102,7 +102,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -76,7 +76,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -121,7 +121,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
/* IRQ stack memory (calculated at run-time) + 8 bytes */
.globl IRQ_STACK_START_IN
......
......@@ -65,7 +65,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -91,7 +91,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -66,7 +66,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -55,5 +55,5 @@ SECTIONS
. = ALIGN(4);
__bss_start = .;
.bss : { *(.bss) }
_end = .;
__bss_end__ = .;
}
......@@ -87,7 +87,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -75,7 +75,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -97,7 +97,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -70,7 +70,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -131,7 +131,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -67,7 +67,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -103,7 +103,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -67,7 +67,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -99,7 +99,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -67,7 +67,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -79,7 +79,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -70,7 +70,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -110,7 +110,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -67,7 +67,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -87,7 +87,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -67,7 +67,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -104,7 +104,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -67,7 +67,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -78,7 +78,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -67,7 +67,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -88,7 +88,7 @@ _bss_start_ofs:
.globl _bss_end_ofs
_bss_end_ofs:
.word _end - _start
.word __bss_end__ - _start
#ifdef CONFIG_USE_IRQ
/* IRQ stack memory (calculated at run-time) */
......
......@@ -70,7 +70,7 @@ SECTIONS
__bss_start = .;
*(.bss)
. = ALIGN(4);
_end = .;
__bss_end__ = .;
}
/DISCARD/ : { *(.dynstr*) }
......
......@@ -244,7 +244,7 @@ relocate_code:
/* zero out .bss */
mov r0, 0
mov r1, 0
lda.w r9, _end
lda.w r9, __bss_end__
sub r9, r8
1: st.d r10++, r0
sub r9, 8
......
......@@ -27,6 +27,6 @@
extern char _text[], _etext[];
extern char _data[], __data_lma[], _edata[], __edata_lma[];
extern char __got_start[], __got_lma[], __got_end[];
extern char _end[];
extern char __bss_end__[];
#endif /* __ASM_AVR32_SECTIONS_H */
......@@ -118,7 +118,7 @@ static int display_banner (void)
printf ("\n\n%s\n\n", version_string);
printf ("U-Boot code: %08lx -> %08lx data: %08lx -> %08lx\n",
(unsigned long)_text, (unsigned long)_etext,
(unsigned long)_data, (unsigned long)_end);
(unsigned long)_data, (unsigned long)__bss_end__);
return 0;
}
......@@ -190,7 +190,7 @@ void board_init_f(ulong board_type)
* - stack
*/
addr = CONFIG_SYS_SDRAM_BASE + sdram_size;
monitor_len = _end - _text;
monitor_len = __bss_end__ - _text;
/*
* Reserve memory for u-boot code, data and bss.
......
......@@ -76,7 +76,7 @@ static char *failed = "*** failed ***\n";
#include <environment.h>
extern ulong __init_end;
extern ulong _end;
extern ulong __bss_end__;
extern void timer_init(void);
......@@ -252,7 +252,7 @@ board_init_f (ulong bootflag)
* - monitor code
* - board info struct
*/
len = (ulong)&_end - CONFIG_SYS_MONITOR_BASE;
len = (ulong)&__bss_end__ - CONFIG_SYS_MONITOR_BASE;
addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
......
......@@ -100,12 +100,12 @@ _cur: movhi r5, %hi(_cur - _start)
3:
/* ZERO BSS/SBSS -- bss and sbss are assumed to be adjacent
* and between __bss_start and _end.
* and between __bss_start and __bss_end__.
*/
movhi r5, %hi(__bss_start)
ori r5, r5, %lo(__bss_start)
movhi r6, %hi(_end)
ori r6, r6, %lo(_end)
movhi r6, %hi(__bss_end__)
ori r6, r6, %lo(__bss_end__)
beq r5, r6, 5f
4: stwio r0, 0(r5)
......
......@@ -103,7 +103,7 @@ SECTIONS
*(.scommon)
}
. = ALIGN(4);
_end = .;
__bss_end__ = .;
PROVIDE (end = .);
/* DEBUG -- symbol table, string table, etc. etc.
......
......@@ -77,7 +77,7 @@
GOT_ENTRY(transfer_to_handler)
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
GOT_ENTRY(__bss_start)
END_GOT
......@@ -722,7 +722,7 @@ in_ram:
* Now clear BSS segment
*/
lwz r3,GOT(__bss_start)
lwz r4,GOT(_end)
lwz r4,GOT(__bss_end__)
cmplw 0, r3, r4
beq 6f
......
......@@ -87,6 +87,6 @@ SECTIONS
*(COMMON)
. = ALIGN(4);
}
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
......@@ -79,7 +79,7 @@
GOT_ENTRY(transfer_to_handler)
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
GOT_ENTRY(__bss_start)
END_GOT
......@@ -626,7 +626,7 @@ clear_bss:
* Now clear BSS segment
*/
lwz r3,GOT(__bss_start)
lwz r4,GOT(_end)
lwz r4,GOT(__bss_end__)
cmplw 0, r3, r4
beq 6f
......
......@@ -82,7 +82,7 @@ SECTIONS
*(COMMON)
. = ALIGN(4);
}
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
ENTRY(_start)
......@@ -70,7 +70,7 @@
GOT_ENTRY(transfer_to_handler)
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
GOT_ENTRY(__bss_start)
END_GOT
......@@ -466,7 +466,7 @@ clear_bss:
* Now clear BSS segment
*/
lwz r3,GOT(__bss_start)
lwz r4,GOT(_end)
lwz r4,GOT(__bss_end__)
cmplw 0, r3, r4
beq 6f
......
......@@ -91,7 +91,7 @@ SECTIONS
. = ALIGN(4);
}
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
. = env_start;
.ppcenv :
......
......@@ -70,7 +70,7 @@
GOT_ENTRY(transfer_to_handler)
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
GOT_ENTRY(__bss_start)
END_GOT
......@@ -681,7 +681,7 @@ clear_bss:
* Now clear BSS segment
*/
lwz r3,GOT(__bss_start)
lwz r4,GOT(_end)
lwz r4,GOT(__bss_end__)
cmplw 0, r3, r4
beq 6f
......
......@@ -91,6 +91,6 @@ SECTIONS
*(COMMON)
. = ALIGN(4);
}
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
......@@ -85,6 +85,6 @@ SECTIONS
*(.sbss*)
. = ALIGN(4);
}
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
......@@ -69,7 +69,7 @@
GOT_ENTRY(transfer_to_handler)
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
GOT_ENTRY(__bss_start)
END_GOT
......@@ -654,7 +654,7 @@ clear_bss:
* Now clear BSS segment
*/
lwz r3,GOT(__bss_start)
lwz r4,GOT(_end)
lwz r4,GOT(__bss_end__)
cmplw 0, r3, r4
beq 6f
......
......@@ -84,6 +84,6 @@ SECTIONS
*(COMMON)
. = ALIGN(4);
}
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
......@@ -77,7 +77,7 @@
GOT_ENTRY(transfer_to_handler)
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
GOT_ENTRY(__bss_start)
#if defined(CONFIG_FADS)
GOT_ENTRY(environment)
......@@ -596,7 +596,7 @@ clear_bss:
* Now clear BSS segment
*/
lwz r3,GOT(__bss_start)
lwz r4,GOT(_end)
lwz r4,GOT(__bss_end__)
cmplw 0, r3, r4
beq 6f
......
......@@ -85,6 +85,6 @@ SECTIONS
*(COMMON)
. = ALIGN(4);
}
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
......@@ -70,7 +70,7 @@
GOT_ENTRY(transfer_to_handler)
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
GOT_ENTRY(__bss_start)
#if defined(CONFIG_HYMOD)
GOT_ENTRY(environment)
......@@ -927,7 +927,7 @@ clear_bss:
*/
lwz r4,GOT(environment)
#else
lwz r4,GOT(_end)
lwz r4,GOT(__bss_end__)
#endif
cmplw 0, r3, r4
......
......@@ -84,6 +84,6 @@ SECTIONS
*(COMMON)
. = ALIGN(4);
}
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
......@@ -72,7 +72,7 @@
START_GOT
GOT_ENTRY(_GOT2_TABLE_)
GOT_ENTRY(__bss_start)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
#ifndef CONFIG_NAND_SPL
GOT_ENTRY(_FIXUP_TABLE_)
......@@ -977,7 +977,7 @@ clear_bss:
*/
lwz r4,GOT(environment)
#else
lwz r4,GOT(_end)
lwz r4,GOT(__bss_end__)
#endif
cmplw 0, r3, r4
......
......@@ -83,7 +83,7 @@ SECTIONS
*(COMMON)
. = ALIGN(4);
}
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
ENTRY(_start)
......@@ -66,7 +66,7 @@
#endif
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
GOT_ENTRY(__bss_start)
END_GOT
......@@ -1050,7 +1050,7 @@ clear_bss:
* Now clear BSS segment
*/
lwz r3,GOT(__bss_start)
lwz r4,GOT(_end)
lwz r4,GOT(__bss_end__)
cmplw 0,r3,r4
beq 6f
......
......@@ -101,6 +101,6 @@ SECTIONS
} :bss
. = ALIGN(4);
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
......@@ -62,6 +62,6 @@ SECTIONS
*(.sbss*)
*(.bss*)
}
_end = .;
__bss_end__ = .;
}
ASSERT(__init_end <= 0xfff00ffc, "NAND bootstrap too big");
......@@ -125,6 +125,6 @@ SECTIONS
} :bss
. = ALIGN(4);
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
......@@ -66,7 +66,7 @@
GOT_ENTRY(transfer_to_handler)
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
GOT_ENTRY(__bss_start)
END_GOT
......@@ -740,7 +740,7 @@ in_ram:
* Now clear BSS segment
*/
lwz r3,GOT(__bss_start)
lwz r4,GOT(_end)
lwz r4,GOT(__bss_end__)
cmplw 0, r3, r4
beq 6f
......
......@@ -88,6 +88,6 @@ SECTIONS
*(COMMON)
. = ALIGN(4);
}
_end = . ;
__bss_end__ = . ;
PROVIDE (end = .);
}
......@@ -77,7 +77,7 @@
GOT_ENTRY(transfer_to_handler)
GOT_ENTRY(__init_end)
GOT_ENTRY(_end)
GOT_ENTRY(__bss_end__)
GOT_ENTRY(__bss_start)
END_GOT
......@@ -597,7 +597,7 @@ clear_bss: