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 bug? Creating a symbol to point to END of section causes section size to blow up



In my project, I exclude the .cinit section from the linker's auto-generated .cmd file, using the .cfg. I then place the .cinit section using my own .cmd file. Up to this point, everything builds and links. Here is the .map file that gets generated:

>> Linked Thu Oct 31 10:26:36 2013

OUTPUT FILE NAME:   <Core0.out>
ENTRY POINT SYMBOL: "_c_int00"  address: 008a2900


MEMORY CONFIGURATION

         name            origin    length      used     unused   attr    fill
----------------------  --------  ---------  --------  --------  ----  --------
  PCIE_SHARED           00800000   00000040  00000000  00000040  RW X
  L2SRAM                00800040   000fffc0  000b9e09  000461b7  RW X
  MSMCSRAM              0c000000   00200000  00022980  001dd680  RW X
  DDR3                  80000000   80000000  00000000  80000000  RW X


SEGMENT ALLOCATION MAP

run origin  load origin   length   init length attrs members
----------  ----------- ---------- ----------- ----- -------
00800040    00800040    00065b35   00000000    rw-
  00800040    00800040    00065b35   00000000    rw- .far
00865b78    00865b78    00000008   00000008    rw-
  00865b78    00865b78    00000008   00000008    rw- .fardata.1
00865b80    00865b80    00000080   00000080    r--
  00865b80    00865b80    00000080   00000080    r-- .const.1
00865c00    00865c00    0004dbce   0004dbce    r-x
  00865c00    00865c00    00000400   00000400    r-x .vecs
  00866000    00866000    00047ce0   00047ce0    r-x .text
  008adce0    008adce0    00005aee   00005aee    r-- .const.2
008b37d0    008b37d0    000029ca   000029ca    rw-
  008b37d0    008b37d0    000029ca   000029ca    rw- .fardata.2
008b61a0    008b61a0    00002000   00000000    rw-
  008b61a0    008b61a0    00002000   00000000    rw- .stack
008b81a0    008b81a0    0000012c   0000012c    r--
  008b81a0    008b81a0    0000012c   0000012c    r-- .switch
008b82cc    008b82cc    00000180   00000000    rw-
  008b82cc    008b82cc    00000120   00000000    rw- .cio
  008b83ec    008b83ec    00000060   00000000    rw- .bss
008b844c    008b844c    00000049   00000049    rw-
  008b844c    008b844c    00000049   00000049    rw- .neardata
008b8498    008b8498    00000068   00000068    r--
  008b8498    008b8498    00000068   00000068    r-- .rodata
008b8500    008b8500    00001954   00001954    r--
  008b8500    008b8500    00000014   00000014    r-- .init_array
  008b8514    008b8514    00001940   00001940    r-- .cinit
0c020000    0c020000    00002980   00000000    rw-
  0c020000    0c020000    00002400   00000000    rw- .qmss
  0c022400    0c022400    00000480   00000000    rw- .cppi
  0c022880    0c022880    00000100   00000000    rw- .srioSharedMem

Next, I try to create a symbol in my .cmd pointing to END of .cinit. This results in the error: 

"../IcscTestApplication.cmd", line 65: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".cinit" size 0x6afec . Available memory ranges:
L2SRAM size: 0xfffc0 unused: 0x47af7 max hole: 0x47aec
error #10010: errors encountered during linking; "Core0.out" not built

So basically this works:

SECTIONS // part of checksum
{
	.cinit: load > L2SRAM, START(_CinitStart)//, END(_CinitEnd)
}

And this does not work:

SECTIONS // part of checksum
{
	.cinit: load > L2SRAM, START(_CinitStart), END(_CinitEnd)
}

  • Here are my CCS installation details:

      ARM BIOS6	6.33.5.46	com.ti.bios.arm.win32.feature.group	Texas Instruments
      ARM Compiler v4.9 Help	4.9.0.201203231355	com.ti.cgt.arm.4.9.help.feature.group	Texas Instruments
      ARM IPC	1.24.3.32	com.ti.ipc.arm.win32.feature.group	Texas Instruments
      ARM XDCTools	3.23.3.53	com.ti.xdctools.arm.win32.feature.group	Texas Instruments
      BIOS 5	5.41.13.42	com.ti.bios.5.41.win32.feature.group	Texas Instruments
      BIOS 6	6.33.5.46	com.ti.bios.base.win32.feature.group	Texas Instruments
      Blackhawk CCSv5.2 Emulation	5.2.0.200	com.bh.ccstudio.emulation.feature.group	Blackhawk
      Blackhawk Emulators	5.2.0.200	com.bh.ccstudio.emulation.win32.feature.group	Texas Instruments
      C6000 BIOS6	6.33.5.46	com.ti.bios.c6000.win32.feature.group	Texas Instruments
      C6000 Compiler Tools	7.3.11	com.ti.cgt.c6000.7.3.win32.feature.group	Texas Instruments
      C6000 Compiler v7.3 Help	7.3.0.201203231357	com.ti.cgt.c6000.7.3.help.feature.group	Texas Instruments
      C6000 Device Support	1.0.4	com.ti.ccstudio.c6000.devicesupport.win32.feature.group	Texas Instruments
      C6000 IPC	1.24.3.32	com.ti.ipc.c6000.win32.feature.group	Texas Instruments
      C6000 Multicore Device Support	1.0.3	com.ti.ccstudio.c6000mc.devicesupport.win32.feature.group	Texas Instruments
      C6000 XDCTools	3.23.3.53	com.ti.xdctools.c6000.win32.feature.group	Texas Instruments
      CCSINIT	5.1.0.0	com.ti.ccstudio.ccsinit.win32.feature.group	Texas Instruments
      Code Composer Studio Base Components	5.2.0.293	com.ti.ccstudio.base.feature.group	Texas Instruments
      Code Composer Studio IDE ARM Components	5.1.0.201206191800	com.ti.ccstudio.tms470.feature.group	Texas Instruments
      Code Composer Studio IDE C6000 Components	5.1.0.201206191800	com.ti.ccstudio.c6000.feature.group	Texas Instruments
      Code Composer Studio IDE Main Feature	5.0.1.201206191800	com.ti.ccstudio.idemain.feature.group	Texas Instruments
      Code Composer Studio IDE MSP430 Components	5.1.0.201206191800	com.ti.ccstudio.msp430.feature.group	Texas Instruments
      Code Composer Studio IDE Workflow	5.0.1.201206191800	com.ti.ccstudio.workflow.feature.group	Texas Instruments
      Compiler Tools On-line Documentation	1.0.5.0	com.ti.cgt.dmed.win32.feature.group	Texas Instruments
      Debug Server	5.2.0.293	com.ti.ccstudio.debugserver.win32.feature.group	Texas Instruments
      DSP/BIOS (IDE Client)	5.41.13.42	com.ti.rtsc.DSPBIOS.product.ui.feature.group	Texas Instruments
      DSP/BIOS (Target Content)	5.41.13.42	com.ti.rtsc.DSPBIOS.product_5.41.13.42.feature.group	Texas Instruments
      DSPLIB C66x	3.1.0.0	ti.mas.dsplib.c66x_3.1.0.0.feature.group	Texas Instruments Inc.
      DVT - Graph Visualization	3.2.0.201206032146	com.ti.dvt2.graph.visualization.feature.group	Texas Instruments
      DVT - Profiler Analysis Manager	3.2.0.201206032146	com.ti.dvt2.profileanalysismanager.feature.group	Texas Instruments
      DVT - RTA Feature	3.2.0.201206032146	com.ti.dvt2.rta.feature.group	Texas Instruments
      DVT - System Analyzer	3.2.0.201206032146	com.ti.dvt2.uia.feature.group	Texas Instruments
      DVT - Trace Control	3.2.0.201206032146	com.ti.dvt2.trace.control.feature.group	Texas Instruments
      Eclipse IDE for C/C++ Developers	1.4.2.20120213-0813	epp.package.cpp	null
      EDMA3	2.11.5	com.ti.sdo.edma3_02.11.05.feature.group	Texas Instruments
      Grace	1.10.4.36	com.ti.grace.win32.feature.group	Texas Instruments
      Grace (MSP430) (IDE Client)	1.10.4.36	com.ti.sdo.grace.product.ui.feature.group	Texas Instruments Inc.
      Grace (MSP430) (Target Content)	1.10.4.36	com.ti.sdo.grace.product_1.10.4.36.feature.group	Texas Instruments Inc.
      Image Analyzer	3.2.0.201206032146	com.ti.dvt2.via.ccs.feature.group	Texas Instruments
      IMGLIB C66x	3.1.1.0	ti.imglib.c66x_3.1.1.0.feature.group	Texas Instruments Inc.
      Integra Device Support	1.0.7	com.ti.ccstudio.integra.devicesupport.win32.feature.group	Texas Instruments
      IPC	1.24.3.32	com.ti.ipc.base.win32.feature.group	Texas Instruments
      IPC (Multicore and I/O) (IDE Client)	1.24.3.32	com.ti.rtsc.IPC.product.ui.feature.group	Texas Instruments
      IPC (Multicore and I/O) (Target Content)	1.24.3.32	com.ti.rtsc.IPC.product_1.24.3.32.feature.group	Texas Instruments
      Keystone1	1.0.4.0	com.ti.emulation.keystone1.win32.feature.group	Texas Instruments
      LWInstaller	5.2.1.00018	com.ti.ccstudio.installer.win32.feature.group	Texas Instruments
      MATHLIB C66x	3.0.1.1	ti.mathlib.c66x_3.0.1.1.feature.group	Texas Instruments Inc.
      MCSDK TMDXEVM6657 PDK	1.1.1.4	com.ti.biosmcsdk.pdk.C6657.feature.group	Texas Instruments Incorporated
      MCSDK TMDXEVM6657 PDK P2 Tracker	1.1.1.4	com.ti.biosmcsdk.pdk.C6657.p2.feature.group	Texas Instruments Incorporated
      MCSDK TMDXEVM6670 PDK	1.1.1.4	com.ti.biosmcsdk.pdk.C6670.feature.group	Texas Instruments Incorporated
      MCSDK TMDXEVM6670 PDK P2 Tracker	1.1.1.4	com.ti.biosmcsdk.pdk.C6670.p2.feature.group	Texas Instruments Incorporated
      MCSDK TMDXEVM6678L PDK	1.1.1.4	com.ti.biosmcsdk.pdk.C6678L.feature.group	Texas Instruments Incorporated
      MCSDK TMDXEVM6678L PDK P2 Tracker	1.1.1.4	com.ti.biosmcsdk.pdk.C6678L.p2.feature.group	Texas Instruments Incorporated
      MSP430 BIOS6	6.33.5.46	com.ti.bios.msp430.win32.feature.group	Texas Instruments
      MSP430 Compiler Tools	4.1.5	com.ti.cgt.msp430.4.1.win32.feature.group	Texas Instruments
      MSP430 Compiler v4.1 Help	4.1.0.201203281425	com.ti.cgt.msp430.4.1.help.feature.group	Texas Instruments
      MSP430 Emulators	5.4.0.2	com.ti.ccstudio.msp430.emu.win32.feature.group	Texas Instruments
      MSP430 IPC	1.24.3.32	com.ti.ipc.msp430.win32.feature.group	Texas Instruments
      MSP430 XDCTools	3.23.3.53	com.ti.xdctools.msp430.win32.feature.group	Texas Instruments
      MSP430ware	1.40.0.26	com.ti.msp430.msp430ware.win32.feature.group	Texas Instruments
      NDK (IDE Client)	2.21.1.38	com.ti.rtsc.NDK.product.ui.feature.group	Texas Instruments
      NDK (Target Content)	2.21.1.38	com.ti.rtsc.NDK.product_2.21.1.38.feature.group	Texas Instruments
      OpenMP BIOS runtime library (IDE Client)	1.1.2.06	com.ti.rtsc.OMP.product.ui.feature.group	Texas Instruments
      OpenMP BIOS runtime library (Target Content)	1.1.2.06	com.ti.rtsc.OMP.product_1.1.2.06.feature.group	Texas Instruments
      PyDev for Eclipse	2.7.3.2013031601	org.python.pydev.feature.feature.group	Aptana
      Pydev Mylyn Integration	0.4.0	org.python.pydev.mylyn.feature.feature.group	Fabio Zadrozny
      REQUIRED CCS Update Installation Tool	5.2.0.201204111758	com.ti.ccstudio.p2tool.feature.group	Texas Instruments
      ROV	3.2.0.201206032146	com.ti.dvt2.rov.feature.group	Texas Instruments
      RTSC/XDCtools (IDE Client)	3.23.4.60	org.eclipse.rtsc.xdctools.product.ui.feature.group	Texas Instruments
      RTSC/XDCtools (Target Runtime Support)	3.23.4.60	org.eclipse.rtsc.xdctools.product_3.23.4.60.feature.group	Texas Instruments
      RTSC/XDCtools (Target Runtime Support)	3.23.3.53	org.eclipse.rtsc.xdctools.product_3.23.3.53.feature.group	Texas Instruments
      Shared Device Support	1.0.4	com.ti.ccstudio.shared.devicesupport.win32.feature.group	Texas Instruments
      Spectrum Digital Emulators	5.2.0.00	com.sd.ccstudio.emulation.win32.feature.group	Texas Instruments
      SYS/BIOS (IDE Client)	6.33.6.50	com.ti.rtsc.SYSBIOS.product.ui.feature.group	Texas Instruments
      SYS/BIOS (Target Content)	6.33.6.50	com.ti.rtsc.SYSBIOS.product_6.33.6.50.feature.group	Texas Instruments
      SYS/BIOS (Target Content)	6.33.5.46	com.ti.rtsc.SYSBIOS.product_6.33.5.46.feature.group	Texas Instruments
      SYS/BIOS MCSDK	2.1.1.4	com.ti.biosmcsdk.mcsdk.feature.group	Texas Instruments Incorporated
      SYS/BIOS MCSDK P2 Tracker	2.1.1.4	com.ti.biosmcsdk.feature.group	Texas Instruments Incorporated
      System Analyzer (UIA Target) (IDE Client)	1.1.0.04	com.ti.uia.product.ui.feature.group	Texas Instruments
      System Analyzer (UIA Target) (Target Content)	1.1.0.04	com.ti.uia.product_1.1.0.04.feature.group	Texas Instruments
      TI Emulators	5.0.747.1	com.ti.emulation.pack.win32.feature.group	Texas Instruments
      TI Simulators	5.2.4.17	com.ti.sim.pack.setup.win32.feature.group	Texas Instruments
      Trace Analyzer	3.2.0.201206032146	com.ti.dvt2.trace.ccs.feature.group	Texas Instruments
      UIA	1.1.0.04	com.ti.uia.win32.feature.group	Texas Instruments
      XDAIS	7.21.1.07	com.ti.xdais.7.21.win32.feature.group	Texas Instruments
      XDAIS (IDE Client)	7.21.1.07	com.ti.rtsc.XDAIS.product.ui.feature.group	Texas Instruments Inc.
      XDAIS (Target Content)	7.21.1.07	com.ti.rtsc.XDAIS.product_7.21.01.07.feature.group	Texas Instruments Inc.
      XDCTools	3.23.3.53	com.ti.xdctools.base.win32.feature.group	Texas Instruments
  • I presume you are building for some C6000 device with compiler version 7.3.11.  I am unable to reproduce the linker problem you describe.  The only way I see forward is for you to share your project with us.

    Thanks and regards,

    -George

  • I cannot share the project publically (post it on the forum). Is there a way I can send it to the TI team specifically?

  • Thank you for submitting a test case through private channels.  We can reproduce the problem.  SDSCM00048747 is filed in the SDOWP system to track this issue.  Feel free to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George