ss555 BSP - Debug mode, non-debug mode questions for linker file

ap at ap at
Fri Oct 28 15:47:15 UTC 2005

Hi everybody,

I'm trying to port the ss555 BSP to another platform. Looking through the
code, I found a couple of weird things in the code, which I consider a bit

- The linker command file (linkcmds) seems to be weird, if debugging is
switched off, i.e. the program is supposed to reside in RAM. As far as I
can see, the .data section seems to be placed right behind the .text
section, even is RTEMS_DEBUG is not defined. This should work fine, as
long as data.contents.start is actually in RAM. Otherwise this seems to be
broken. -

Or does this simply make sure, that .data is defined correctly, while the
actual section needs to be found right after .text in the flash image? (in
order to copy it into RAM then)

.text {
     * .data section contents, copied to RAM at system startup.
    . = ALIGN(0x20);
    data.contents.start = .;
  text.size = text.end - text.start;

   * If debugging, stack the read/write sections directly after the text
   * section.  Otherwise, stack the read/write sections starting at base of
   * internal RAM.
  . = DEFINED(RTEMS_DEBUG) ? . : int_ram_org;

  /* This line places the data always right behind .text, doesn't it? ap */
  .data : AT (data.contents.start)
    data.start = .;

More information about the users mailing list