diff options
| -rw-r--r-- | arch/avr32/lib/board.c | 1 | ||||
| -rw-r--r-- | arch/m68k/lib/board.c | 1 | ||||
| -rw-r--r-- | arch/nds32/lib/board.c | 1 | ||||
| -rw-r--r-- | arch/sparc/lib/board.c | 1 | ||||
| -rw-r--r-- | common/dlmalloc.c | 6 | ||||
| -rw-r--r-- | include/malloc.h | 1 | 
6 files changed, 5 insertions, 6 deletions
| diff --git a/arch/avr32/lib/board.c b/arch/avr32/lib/board.c index d3c8cb76d..bd1be73ae 100644 --- a/arch/avr32/lib/board.c +++ b/arch/avr32/lib/board.c @@ -286,7 +286,6 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)  	/* The malloc area is right below the monitor image in RAM */  	mem_malloc_init(CONFIG_SYS_MONITOR_BASE + gd->reloc_off -  			CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN); -	malloc_bin_reloc();  	dma_alloc_init();  	enable_interrupts(); diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c index c372ae228..33acffe43 100644 --- a/arch/m68k/lib/board.c +++ b/arch/m68k/lib/board.c @@ -449,7 +449,6 @@ void board_init_r (gd_t *id, ulong dest_addr)  	/* The Malloc area is immediately below the monitor copy in DRAM */  	mem_malloc_init (CONFIG_SYS_MONITOR_BASE + gd->reloc_off -  			TOTAL_MALLOC_LEN, TOTAL_MALLOC_LEN); -	malloc_bin_reloc ();  #if !defined(CONFIG_SYS_NO_FLASH)  	puts ("Flash: "); diff --git a/arch/nds32/lib/board.c b/arch/nds32/lib/board.c index 09feaf373..c919928a3 100644 --- a/arch/nds32/lib/board.c +++ b/arch/nds32/lib/board.c @@ -320,7 +320,6 @@ void board_init_r(gd_t *id, ulong dest_addr)  	/* The Malloc area is immediately below the monitor copy in DRAM */  	malloc_start = dest_addr - TOTAL_MALLOC_LEN;  	mem_malloc_init(malloc_start, TOTAL_MALLOC_LEN); -	malloc_bin_reloc();  #ifndef CONFIG_SYS_NO_FLASH  	/* configure available FLASH banks */ diff --git a/arch/sparc/lib/board.c b/arch/sparc/lib/board.c index 1b5e995b1..79fb4c87e 100644 --- a/arch/sparc/lib/board.c +++ b/arch/sparc/lib/board.c @@ -271,7 +271,6 @@ void board_init_f(ulong bootflag)  	/* The Malloc area is immediately below the monitor copy in RAM */  	mem_malloc_init(CONFIG_SYS_MALLOC_BASE,  			CONFIG_SYS_MALLOC_END - CONFIG_SYS_MALLOC_BASE); -	malloc_bin_reloc();  #if !defined(CONFIG_SYS_NO_FLASH)  	puts("Flash: "); diff --git a/common/dlmalloc.c b/common/dlmalloc.c index b2f0a1ad5..2a9d169f9 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -1485,7 +1485,7 @@ static mbinptr av_[NAV * 2 + 2] = {  };  #ifdef CONFIG_NEEDS_MANUAL_RELOC -void malloc_bin_reloc (void) +static void malloc_bin_reloc(void)  {  	mbinptr *p = &av_[2];  	size_t i; @@ -1493,6 +1493,8 @@ void malloc_bin_reloc (void)  	for (i = 2; i < ARRAY_SIZE(av_); ++i, ++p)  		*p = (mbinptr)((ulong)*p + gd->reloc_off);  } +#else +static inline void malloc_bin_reloc(void) {}  #endif  ulong mem_malloc_start = 0; @@ -1526,6 +1528,8 @@ void mem_malloc_init(ulong start, ulong size)  	mem_malloc_brk = start;  	memset((void *)mem_malloc_start, 0, size); + +	malloc_bin_reloc();  }  /* field-extraction macros */ diff --git a/include/malloc.h b/include/malloc.h index 84ecf7934..6295929ea 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -937,7 +937,6 @@ extern ulong mem_malloc_end;  extern ulong mem_malloc_brk;  void mem_malloc_init(ulong start, ulong size); -void malloc_bin_reloc(void);  #ifdef __cplusplus  };  /* end of extern "C" */ |