This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linker output differs when building on different PC

Hello,

there seems to be an strange issue with the linker for the TMS570 - TMS470 C/C++ Compiler: v4.9.0.
By providing the linker command file in this post, the section .osarmvect is not located on the desired location.

Both builds are done with the same tooling and make environment. The successful build was done locally. The failed build on a remote machine, mounting the folder as share on the network.
We cross-checked that both machine use the same compiler and the same source files.

MAP file of an successful Build:

******************************************************************************
                  TMS470 Linker PC v4.9.0                      
******************************************************************************
>> Linked Wed May 30 16:49:49 2012

SEGMENT ALLOCATION MAP

run origin  load origin   length   init length attrs members
----------  ----------- ---------- ----------- ----- -------
00000000    00000000    00000020   00000020    r-x
  00000000    00000000    00000020   00000020    r-x .jmpvectors
00020000    00020000    00000008   00000008    r--
  00020000    00020000    00000008   00000008    r-- .APPLHEADER
00020080    00020080    000001a8   000001a8    r-x
  00020080    00020080    00000004   00000004    r-x .osresetvect
  00020084    00020084    0000001c   0000001c    r-x .osarmvect
  000200a0    000200a0    00000188   00000188    r-- .osvtable
00020280    00020280    0002ab44   0002ab44    r-x
  00020280    00020280    00026e74   00026e74    r-x .text
  000470f4    000470f4    000039d8   000039d8    r-- .const
  0004aad0    0004aad0    000002f0   000002f0    r-- .cinit
  0004adc0    0004adc0    00000004   00000004    r-- .APPLTRAILER
0017fff0    0017fff0    00000008   00000008    r--
  0017fff0    0017fff0    00000008   00000008    r-- .PRESENCEFLAG
08001300    08001300    000080d8   00000000    rw-
  08001300    08001300    000080d8   00000000    rw- .bss
080093d8    080093d8    000002bd   000002bd    rw-
  080093d8    080093d8    000002bd   000002bd    rw- .data


SECTION ALLOCATION MAP

 output                                  attributes/
section   page    origin      length       input sections
--------  ----  ----------  ----------   ----------------
.jmpvectors 
*          0    00000000    00000020     
                  00000000    00000020     jmpvectors.obj (.jmpvectors)

.APPLHEADER 
*          0    00020000    00000008     
                  00020000    00000008     ApplHeader.obj (.APPLHEADER:retain)

.osresetvect 
*          0    00020080    00000004     
                  00020080    00000004     intvect.obj (.osresetvect)

.osarmvect 
*          0    00020084    0000001c     
                  00020084    0000001c     intvect.obj (.osarmvect)

.osvtable 
*          0    000200a0    00000188     
                  000200a0    00000188     intvect.obj (.osvtable)

.text      0    00020280    00026e74     

_______________________________________________

MAP file of an failed Build:

******************************************************************************
                  TMS470 Linker PC v4.9.0                      
******************************************************************************
>> Linked Wed May 30 17:02:58 2012
SEGMENT ALLOCATION MAP

run origin  load origin   length   init length attrs members
----------  ----------- ---------- ----------- ----- -------
00000000    00000000    00000020   00000020    r-x
  00000000    00000000    00000020   00000020    r-x .jmpvectors
00020000    00020000    00000008   00000008    r--
  00020000    00020000    00000008   00000008    r-- .APPLHEADER
00020080    00020080    0000018c   0000018c    r-x
  00020080    00020080    00000004   00000004    r-x .osresetvect
  00020084    00020084    00000188   00000188    r-- .osvtable
00020280    00020280    0002ab44   0002ab44    r-x
  00020280    00020280    00026e74   00026e74    r-x .text
  000470f4    000470f4    000039d8   000039d8    r-- .const
  0004aad0    0004aad0    000002f0   000002f0    r-- .cinit
  0004adc0    0004adc0    00000004   00000004    r-- .APPLTRAILER
0017fff0    0017fff0    00000008   00000008    r--
  0017fff0    0017fff0    00000008   00000008    r-- .PRESENCEFLAG
08001300    08001300    000080d8   00000000    rw-
  08001300    08001300    000080d8   00000000    rw- .bss
080093d8    080093d8    000002bd   000002bd    rw-
  080093d8    080093d8    000002bd   000002bd    rw- .data


SECTION ALLOCATION MAP

 output                                  attributes/
section   page    origin      length       input sections
--------  ----  ----------  ----------   ----------------
.jmpvectors 
*          0    00000000    00000020     
                  00000000    00000020     jmpvectors.obj (.jmpvectors)

.APPLHEADER 
*          0    00020000    00000008     
                  00020000    00000008     ApplHeader.obj (.APPLHEADER:retain)

.osresetvect 
*          0    00020080    00000004     
                  00020080    00000004     intvect.obj (.osresetvect)

.osarmvect 
*          0    00020084    00000000     UNINITIALIZED

.osvtable 
*          0    00020084    00000188     
                  00020084    00000188     intvect.obj (.osvtable)

.text      0    00020280    00026e74     

_______________________________________________

Linker Command File:

/****************************************************************************************/
/* Module version: 1.00                                                                 */
/****************************************************************************************/

/****************************************************************************************/
/* Options                                                                              */
/****************************************************************************************/
/****************************************************************************************/
/* SPECIFY THE SYSTEM MEMORY MAP for PSFC61 */                                     
/****************************************************************************************/
MEMORY
{
    /* BANK 0 */
    JMPVECTORS   (X)  : origin=0x00000000 length=0x00000020  /* Dummy JMPVECTORS section can be removed if FBL is integrated */
    HEADER       (R)  : origin=0x00020000 length=0x00000080  /* */
    VECTORS      (RX) : origin=0x00020080 length=0x00000200  /* Interrupt Vectors are placed here */
    DSW          (RX) : origin=0x00020280 length=0x0015FD70  /* Application space for driving software */
    PRESENCEFLAG (R)  : origin=0x0017FFF0 length=0x00000010  /* Last 16 Byte are for the presence flag and MASK. Needed by the FBL */
    
    
    /* BANK 1 */            
    FLASH3       (RX)    : origin=0x00180000 length=0x00080000
    
    /* TCM RAM */  
    STACKS       (RW) : origin=0x08000000 length=0x00001300  /* Stacks used by ... */
    RAM          (RW) : origin=0x08001300 length=0x0001ED00
}
/****************************************************************************************/


/****************************************************************************************/
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY                                          */
/****************************************************************************************/
SECTIONS
{
    .stack   : {
                    _StackUSER_  = .+ (0x1000 - (256+128+128+128+128));
                    _StackFIQ_   = _StackUSER_  + 128;
                    _StackIRQ_   = _StackFIQ_   + 256;
                    _StackABORT_ = _StackIRQ_   + 128;
                    _StackUND_   = _StackABORT_ + 128;
                    _StackSUPER_ = _StackUND_   + 128;
               } > STACKS       /* SOFTWARE SYSTEM STACK            */

    .bss     : {
                 /* #include "tcb\osobjs.inc" */
                 *(.bss)
               } > RAM         /* GLOBAL & STATIC VARS              */
    .data    : {
                 /* #include "tcb\osobjs_init.inc" */
                 *(.data)
               } > RAM             /* INITIALIZED DATA              */


    .jmpvectors  : {} > JMPVECTORS    /* TODO: Remove after using it with FBL!! */ 
    
    .APPLHEADER   : {} > HEADER
    
    GROUP (VECTORS) :
    {
        .osresetvect  /* INTERRUPT VECTORS             */
        .osarmvect    /* INTERRUPT VECTORS             */
        .osvtable   
    } load=VECTORS

    GROUP (APPLICATION) :
    {
        .text      
        .const       
        .cinit       
        .pinit
        .APPLTRAILER       
    } load=DSW
    
    
    .PRESENCEFLAG  : {} > PRESENCEFLAG   /* This is the presence flag the FBL normaly writes. For using it with the debugger we place it here */
    
}

  • Please post the code (hand coded assembly, I presume) which creates the section .osarmvect.

    Thanks and regards,

    -George

  • I've attached the complete ASM file.
    The definition can be found at line 1367 ff

    6013.intvect.asm

  • to give some more info :

    - To reproduce this behavior it was not necessary to work on a remote machine. It has been sufficient to mount the local disk as a network drive on the very same computer too.

    - We could control every entry in the linker spec file as we liked, except for that incriminated .osarmvect entry. For us it looked like  the linker discarded this line.

    regards

    Martin

  • This is probably a bug in the linker.  That a network drive somehow makes things fail is very odd.  This might be difficult to reproduce.  Nonetheless, until we reproduce it, there is nothing we can do.

    If this is a CCS project, can you send it?  If not a project, can you send all the object files, libraries, and other input seen by the linker?  Of course, be clear about which files need to be on a network drive to cause the problem.

    Thanks and regards,

    -George