possible issue with bss section in sparc

Johan Zandin johan.zandin at space.se
Wed Aug 29 08:40:39 UTC 2007


Aleix Conchillo Flaqué wrote:
>I had a look at the linker script
>(c/src/lib/libbsp/sparc/erc32/startup/linkcmds):

Do you use the standard linker script included in the
distribution or have you modified it in some way?

Because you can get into some troubles if _edata and _bss_start
does not refer to the same address. That may be a bug in the
following code, which uses _edata instead of _bss_start:

>the startup code (c/src/lib/libbsp/sparc/shared/start.S):
>
>        /* clear the bss */
>1:
>
>        sethi %hi(_edata),%g2
>        or    %g2,%lo(_edata),%g2       ! g2 = start of bss

Using _bss_start instead may be worth a try...

/Johan

-----------------------------------------------------------
Johan Zandin                      Software Engineer
Saab Space AB                     Phone: +46-31-735 41 47
SE-405 15 Gothenburg, Sweden      Fax:   +46-31-735 40 00
-----------------------------------------------------------




More information about the users mailing list