powerpc gen405 linkcmds bug

Smith, Gene gene.smith at siemens.com
Thu Oct 14 17:18:02 UTC 2004

It appears that c/src/lib/libbsp/powerpc/gen405/startup/linkcmds contain 
a possible error at line 148.

Variable _end is defined at line 141 as the end of .bss (which is also 
the start of heap. But a few line latter at line 148 it is redefined (to 
the end of stack).

The problem occurs in start/bspstart.c in bsp_pretasking_hook li 135 
where heap_size is determined based on _end and _heap_end. It comes out 
negative (or very large) since _end (heap_start) is now bigger than 
heap_end. Eventually memset is called which never returns or takes a 
real long time to return (stuck in loop at memset.c li 84).

Remove li 148 from gen405's linkcmds so _end is not redefined.

This is from the standard rtems-4.6.1 code base.


More information about the users mailing list