m68k: Replace m68k-specific _[se]bss by generic __bss_{start,stop}
BSS_SECTION() provides the __bss_{start,stop} symbols, so there's no need to wrap our own _[se]bss around it. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Greg Ungerer<gerg@uclinux.org>
This commit is contained in:
parent
363737d664
commit
dc0610518f
|
@ -3,6 +3,4 @@
|
||||||
|
|
||||||
#include <asm-generic/sections.h>
|
#include <asm-generic/sections.h>
|
||||||
|
|
||||||
extern char _sbss[], _ebss[];
|
|
||||||
|
|
||||||
#endif /* _ASM_M68K_SECTIONS_H */
|
#endif /* _ASM_M68K_SECTIONS_H */
|
||||||
|
|
|
@ -219,9 +219,9 @@ void __init setup_arch(char **cmdline_p)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pr_debug("KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p BSS=0x%p-0x%p\n",
|
pr_debug("KERNEL -> TEXT=0x%p-0x%p DATA=0x%p-0x%p BSS=0x%p-0x%p\n",
|
||||||
_stext, _etext, _sdata, _edata, _sbss, _ebss);
|
_stext, _etext, _sdata, _edata, __bss_start, __bss_stop);
|
||||||
pr_debug("MEMORY -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx\n ",
|
pr_debug("MEMORY -> ROMFS=0x%p-0x%06lx MEM=0x%06lx-0x%06lx\n ",
|
||||||
_ebss, memory_start, memory_start, memory_end);
|
__bss_stop, memory_start, memory_start, memory_end);
|
||||||
|
|
||||||
/* Keep a copy of command line */
|
/* Keep a copy of command line */
|
||||||
*cmdline_p = &command_line[0];
|
*cmdline_p = &command_line[0];
|
||||||
|
|
|
@ -78,9 +78,7 @@ SECTIONS {
|
||||||
__init_end = .;
|
__init_end = .;
|
||||||
}
|
}
|
||||||
|
|
||||||
_sbss = .;
|
|
||||||
BSS_SECTION(0, 0, 0)
|
BSS_SECTION(0, 0, 0)
|
||||||
_ebss = .;
|
|
||||||
|
|
||||||
_end = .;
|
_end = .;
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,7 @@ SECTIONS
|
||||||
|
|
||||||
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
|
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
|
||||||
|
|
||||||
_sbss = .;
|
|
||||||
BSS_SECTION(0, 0, 0)
|
BSS_SECTION(0, 0, 0)
|
||||||
_ebss = .;
|
|
||||||
|
|
||||||
_edata = .; /* End of data section */
|
_edata = .; /* End of data section */
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,7 @@ __init_begin = .;
|
||||||
. = ALIGN(PAGE_SIZE);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__init_end = .;
|
__init_end = .;
|
||||||
|
|
||||||
_sbss = .;
|
|
||||||
BSS_SECTION(0, 0, 0)
|
BSS_SECTION(0, 0, 0)
|
||||||
_ebss = .;
|
|
||||||
|
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ void __init print_memmap(void)
|
||||||
MLK_ROUNDUP(__init_begin, __init_end),
|
MLK_ROUNDUP(__init_begin, __init_end),
|
||||||
MLK_ROUNDUP(_stext, _etext),
|
MLK_ROUNDUP(_stext, _etext),
|
||||||
MLK_ROUNDUP(_sdata, _edata),
|
MLK_ROUNDUP(_sdata, _edata),
|
||||||
MLK_ROUNDUP(_sbss, _ebss));
|
MLK_ROUNDUP(__bss_start, __bss_stop));
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init mem_init(void)
|
void __init mem_init(void)
|
||||||
|
|
|
@ -91,7 +91,7 @@ void __init mem_init(void)
|
||||||
totalram_pages = free_all_bootmem();
|
totalram_pages = free_all_bootmem();
|
||||||
|
|
||||||
codek = (_etext - _stext) >> 10;
|
codek = (_etext - _stext) >> 10;
|
||||||
datak = (_ebss - _sdata) >> 10;
|
datak = (__bss_stop - _sdata) >> 10;
|
||||||
initk = (__init_begin - __init_end) >> 10;
|
initk = (__init_begin - __init_end) >> 10;
|
||||||
|
|
||||||
tmp = nr_free_pages() << PAGE_SHIFT;
|
tmp = nr_free_pages() << PAGE_SHIFT;
|
||||||
|
|
|
@ -60,8 +60,8 @@ _start:
|
||||||
* Move ROM filesystem above bss :-)
|
* Move ROM filesystem above bss :-)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
moveal #_sbss, %a0 /* romfs at the start of bss */
|
moveal #__bss_start, %a0 /* romfs at the start of bss */
|
||||||
moveal #_ebss, %a1 /* Set up destination */
|
moveal #__bss_stop, %a1 /* Set up destination */
|
||||||
movel %a0, %a2 /* Copy of bss start */
|
movel %a0, %a2 /* Copy of bss start */
|
||||||
|
|
||||||
movel 8(%a0), %d1 /* Get size of ROMFS */
|
movel 8(%a0), %d1 /* Get size of ROMFS */
|
||||||
|
@ -84,8 +84,8 @@ _start:
|
||||||
* Initialize BSS segment to 0
|
* Initialize BSS segment to 0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
lea _sbss, %a0
|
lea __bss_start, %a0
|
||||||
lea _ebss, %a1
|
lea __bss_stop, %a1
|
||||||
|
|
||||||
/* Copy 0 to %a0 until %a0 == %a1 */
|
/* Copy 0 to %a0 until %a0 == %a1 */
|
||||||
2: cmpal %a0, %a1
|
2: cmpal %a0, %a1
|
||||||
|
|
|
@ -110,7 +110,7 @@ L0:
|
||||||
movel #CONFIG_VECTORBASE, %d7
|
movel #CONFIG_VECTORBASE, %d7
|
||||||
addl #16, %d7
|
addl #16, %d7
|
||||||
moveal %d7, %a0
|
moveal %d7, %a0
|
||||||
moveal #_ebss, %a1
|
moveal #__bss_stop, %a1
|
||||||
lea %a1@(512), %a2
|
lea %a1@(512), %a2
|
||||||
|
|
||||||
DBG_PUTC('C')
|
DBG_PUTC('C')
|
||||||
|
@ -138,8 +138,8 @@ LD1:
|
||||||
|
|
||||||
DBG_PUTC('E')
|
DBG_PUTC('E')
|
||||||
|
|
||||||
moveal #_sbss, %a0
|
moveal #__bss_start, %a0
|
||||||
moveal #_ebss, %a1
|
moveal #__bss_stop, %a1
|
||||||
|
|
||||||
/* Copy 0 to %a0 until %a0 == %a1 */
|
/* Copy 0 to %a0 until %a0 == %a1 */
|
||||||
L1:
|
L1:
|
||||||
|
@ -150,7 +150,7 @@ L1:
|
||||||
DBG_PUTC('F')
|
DBG_PUTC('F')
|
||||||
|
|
||||||
/* Copy command line from end of bss to command line */
|
/* Copy command line from end of bss to command line */
|
||||||
moveal #_ebss, %a0
|
moveal #__bss_stop, %a0
|
||||||
moveal #command_line, %a1
|
moveal #command_line, %a1
|
||||||
lea %a1@(512), %a2
|
lea %a1@(512), %a2
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ L3:
|
||||||
|
|
||||||
movel #_sdata, %d0
|
movel #_sdata, %d0
|
||||||
movel %d0, _rambase
|
movel %d0, _rambase
|
||||||
movel #_ebss, %d0
|
movel #__bss_stop, %d0
|
||||||
movel %d0, _ramstart
|
movel %d0, _ramstart
|
||||||
|
|
||||||
movel %a4, %d0
|
movel %a4, %d0
|
||||||
|
|
|
@ -76,8 +76,8 @@ pclp3:
|
||||||
beq pclp3
|
beq pclp3
|
||||||
#endif /* DEBUG */
|
#endif /* DEBUG */
|
||||||
moveal #0x007ffff0, %ssp
|
moveal #0x007ffff0, %ssp
|
||||||
moveal #_sbss, %a0
|
moveal #__bss_start, %a0
|
||||||
moveal #_ebss, %a1
|
moveal #__bss_stop, %a1
|
||||||
|
|
||||||
/* Copy 0 to %a0 until %a0 >= %a1 */
|
/* Copy 0 to %a0 until %a0 >= %a1 */
|
||||||
L1:
|
L1:
|
||||||
|
|
|
@ -59,8 +59,8 @@ _stext: movew #0x2700,%sr
|
||||||
cmpal %a1, %a2
|
cmpal %a1, %a2
|
||||||
bhi 1b
|
bhi 1b
|
||||||
|
|
||||||
moveal #_sbss, %a0
|
moveal #__bss_start, %a0
|
||||||
moveal #_ebss, %a1
|
moveal #__bss_stop, %a1
|
||||||
/* Copy 0 to %a0 until %a0 == %a1 */
|
/* Copy 0 to %a0 until %a0 == %a1 */
|
||||||
|
|
||||||
1:
|
1:
|
||||||
|
@ -70,7 +70,7 @@ _stext: movew #0x2700,%sr
|
||||||
|
|
||||||
movel #_sdata, %d0
|
movel #_sdata, %d0
|
||||||
movel %d0, _rambase
|
movel %d0, _rambase
|
||||||
movel #_ebss, %d0
|
movel #__bss_stop, %d0
|
||||||
movel %d0, _ramstart
|
movel %d0, _ramstart
|
||||||
movel #RAMEND-CONFIG_MEMORY_RESERVE*0x100000, %d0
|
movel #RAMEND-CONFIG_MEMORY_RESERVE*0x100000, %d0
|
||||||
movel %d0, _ramend
|
movel %d0, _ramend
|
||||||
|
|
|
@ -219,8 +219,8 @@ LD1:
|
||||||
cmp.l #_edata, %a1
|
cmp.l #_edata, %a1
|
||||||
blt LD1
|
blt LD1
|
||||||
|
|
||||||
moveal #_sbss, %a0
|
moveal #__bss_start, %a0
|
||||||
moveal #_ebss, %a1
|
moveal #__bss_stop, %a1
|
||||||
|
|
||||||
/* Copy 0 to %a0 until %a0 == %a1 */
|
/* Copy 0 to %a0 until %a0 == %a1 */
|
||||||
L1:
|
L1:
|
||||||
|
@ -234,7 +234,7 @@ load_quicc:
|
||||||
store_ram_size:
|
store_ram_size:
|
||||||
/* Set ram size information */
|
/* Set ram size information */
|
||||||
move.l #_sdata, _rambase
|
move.l #_sdata, _rambase
|
||||||
move.l #_ebss, _ramstart
|
move.l #__bss_stop, _ramstart
|
||||||
move.l #RAMEND, %d0
|
move.l #RAMEND, %d0
|
||||||
sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/
|
sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/
|
||||||
move.l %d0, _ramend /* Different from RAMEND.*/
|
move.l %d0, _ramend /* Different from RAMEND.*/
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.global _stext
|
.global _stext
|
||||||
.global _sbss
|
.global __bss_start
|
||||||
.global _start
|
.global _start
|
||||||
|
|
||||||
.global _rambase
|
.global _rambase
|
||||||
|
@ -229,8 +229,8 @@ LD1:
|
||||||
cmp.l #_edata, %a1
|
cmp.l #_edata, %a1
|
||||||
blt LD1
|
blt LD1
|
||||||
|
|
||||||
moveal #_sbss, %a0
|
moveal #__bss_start, %a0
|
||||||
moveal #_ebss, %a1
|
moveal #__bss_stop, %a1
|
||||||
|
|
||||||
/* Copy 0 to %a0 until %a0 == %a1 */
|
/* Copy 0 to %a0 until %a0 == %a1 */
|
||||||
L1:
|
L1:
|
||||||
|
@ -244,7 +244,7 @@ load_quicc:
|
||||||
store_ram_size:
|
store_ram_size:
|
||||||
/* Set ram size information */
|
/* Set ram size information */
|
||||||
move.l #_sdata, _rambase
|
move.l #_sdata, _rambase
|
||||||
move.l #_ebss, _ramstart
|
move.l #__bss_stop, _ramstart
|
||||||
move.l #RAMEND, %d0
|
move.l #RAMEND, %d0
|
||||||
sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/
|
sub.l #0x1000, %d0 /* Reserve 4K for stack space.*/
|
||||||
move.l %d0, _ramend /* Different from RAMEND.*/
|
move.l %d0, _ramend /* Different from RAMEND.*/
|
||||||
|
|
|
@ -230,8 +230,8 @@ _vstart:
|
||||||
/*
|
/*
|
||||||
* Move ROM filesystem above bss :-)
|
* Move ROM filesystem above bss :-)
|
||||||
*/
|
*/
|
||||||
lea _sbss,%a0 /* get start of bss */
|
lea __bss_start,%a0 /* get start of bss */
|
||||||
lea _ebss,%a1 /* set up destination */
|
lea __bss_stop,%a1 /* set up destination */
|
||||||
movel %a0,%a2 /* copy of bss start */
|
movel %a0,%a2 /* copy of bss start */
|
||||||
|
|
||||||
movel 8(%a0),%d0 /* get size of ROMFS */
|
movel 8(%a0),%d0 /* get size of ROMFS */
|
||||||
|
@ -249,7 +249,7 @@ _copy_romfs:
|
||||||
bne _copy_romfs
|
bne _copy_romfs
|
||||||
|
|
||||||
#else /* CONFIG_ROMFS_FS */
|
#else /* CONFIG_ROMFS_FS */
|
||||||
lea _ebss,%a1
|
lea __bss_stop,%a1
|
||||||
movel %a1,_ramstart
|
movel %a1,_ramstart
|
||||||
#endif /* CONFIG_ROMFS_FS */
|
#endif /* CONFIG_ROMFS_FS */
|
||||||
|
|
||||||
|
@ -257,8 +257,8 @@ _copy_romfs:
|
||||||
/*
|
/*
|
||||||
* Zero out the bss region.
|
* Zero out the bss region.
|
||||||
*/
|
*/
|
||||||
lea _sbss,%a0 /* get start of bss */
|
lea __bss_start,%a0 /* get start of bss */
|
||||||
lea _ebss,%a1 /* get end of bss */
|
lea __bss_stop,%a1 /* get end of bss */
|
||||||
clrl %d0 /* set value */
|
clrl %d0 /* set value */
|
||||||
_clear_bss:
|
_clear_bss:
|
||||||
movel %d0,(%a0)+ /* clear each word */
|
movel %d0,(%a0)+ /* clear each word */
|
||||||
|
|
Loading…
Reference in New Issue