[Bug 1168] sparc BSP: Uninitialized variable in startup.S

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Thu May 22 16:00:18 UTC 2008


Joel Sherrill <joel.sherrill at oarcorp.com> changed:

           What    |Removed                     |Added
             Status|ASSIGNED                    |WAITING

Ingolf Steinbach <ingolf.steinbach at jena-optronik.de> changed:

           What    |Removed                     |Added
    Attachment #166|application/octet-stream    |text/plain
          mime type|                            |
 Attachment #166 is|0                           |1
              patch|                            |

The startup code of the leon2 RTEMS board support package (in
src/rtems-4.6.5/c/src/lib/libbsp/sparc/shared/start.S) copies the data segment
from ROM to RAM if it is not already there (line 286ff).

Before this copy operation, a value located in the not yet initialized RAM area
is accessed in order to read the size of the RTEMS workspace area (line 220ff).

Please note that this problem may be related to PR 821. I'll try to provide
some additional comments to PR 821 later.


RTEMS 4.6.5 on leon2, text and data segment located in ROM, not using mkprom.

Create a ROM version of an executable (by re-directing the text and data
sections to the rom memory area in the linkcmd file) and try to make use of the
automatic copying of the data section.

Notice that the application won't boot because the workspace size is

--- Comment #1 from Ingolf Steinbach <ingolf.steinbach at jena-optronik.de>  2006-08-28 10:16:31 ---
See attachment (suggestion for a patch for rtems/c/src/lib/libbsp/sparc/shared/start.S). The change makes sure that the data section is copied before values from that section are accessed.

--- Comment #2 from Joel Sherrill <joel.sherrill at oarcorp.com>  2006-09-08 15:38:11 ---
State-Changed-From-To: open->feedback
State-Changed-Why: Please confirm this bug on the CVS head and submit a patch
for the start.S in CVS.  It needs to be addressed in both

Configure bugmail: http://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the bugs mailing list