This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Linker Error: Related to ENTRY Point

Note: This was originally posted on 31st August 2010 at http://forums.arm.com

Hi all,

I am using --entry=startup option with the armlink command.
The command I am using is:-
armlink  --cpu=cortex-m3 --entry=startup --scatter=xyz.scat -o abc.exe def.o abc.o --diag_suppress 6238

I get the following error:-

Error: L6204E: Entry point (0x00000290) does not point to an instruction.


In my assembly code, I have:-

        AREA ||.text.startup||, CODE, READONLY, ALIGN=2
label0
startup
        DCD      0x00000000
        DCD      label1
        DCD      label2
        DCD      label2
        DCD      label2
...
...
...


My scatter file has the following contents:-

LOAD_REGION 0x00000000 0x00200000
{
.text +0
{
  *.text.startup (+RO)
  * (+RO)
}

.data +0
{
  *.data (+RW)
  * (+RW)
}

.bss +0
{
  *.bss (+ZI)
  * (+ZI)
}
}


I am using RVDS 4.0 on a Win XP with cygwin environment.

Please guide me with this.

Regards
Abhinav Varma
  • Note: This was originally posted on 1st September 2010 at http://forums.arm.com

    Usually the entry point of an image points is executable code.  Armlink is probably wondering if your image's entry point should be marked as ARM or Thumb.  You've already found --diag_suppress; have you tried suppressing L6204 or downgrading it to a warning with --diag_warning?

    Also if you're expecting .text.startup to be the first section in the .text execution region, you will need to add +FIRST.




    Hey Scott,

    Thanks for the suggestions. The problem was probably because I didnt have any instruction at the specified entry point. So, I inserted a dummy mov r2,  r2 instruction at the entry point. That solved my problem. But the startup doesnt map to 0x0 location. I tried to insert +FIRST in the scatter file

    LOAD_REGION 0x00000000 0x00200000
    {
    .text +0
    {
    *.text.startup (+FIRST, +RO)
    * (+RO)
    }

    .data +0
    {
    *.data (+RW)
    * (+RW)
    }

    .bss +0
    {
    *.bss (+ZI)
    * (+ZI)
    }
    }


    but had the following error:-
    "rtecdc.scat", line 5 (column 19): Error: L6234E: FIRST must follow a single selector.

    probably the *.text.startup selector is matching multiple sections. What should be done?

    Thanks and Regards
    Abhinav Varma
  • Note: This was originally posted on 31st August 2010 at http://forums.arm.com

    Usually the entry point of an image points is executable code.  Armlink is probably wondering if your image's entry point should be marked as ARM or Thumb.  You've already found --diag_suppress; have you tried suppressing L6204 or downgrading it to a warning with --diag_warning?

    Also if you're expecting .text.startup to be the first section in the .text execution region, you will need to add +FIRST.
  • Note: This was originally posted on 6th September 2010 at http://forums.arm.com


    LOAD_REGION 0x00000000 0x00200000
    {
      .text +0
      {
    *.text.startup (+FIRST, +RO)
    * (+RO)
      }
    ...
    }


    but had the following error:-
    "rtecdc.scat", line 5 (column 19): Error: L6234E: FIRST must follow a single selector.

    probably the *.text.startup selector is matching multiple sections. What should be done?


    I think you've got the input section syntax confused.  Do you want to be using

    [code]
       * (.text.startup, +FIRST)
    ?  The * is matching the object file name and the stuff inside the "()"s specifies the sections from that object file.

    Likewise, these two look confused:
    ...
       *.data (+RW)
    ...
       *.bss (+ZI)
    ...


    They can probably just be removed since the line following each one is sufficient.

    According to the docs [url="http://infocenter.arm.com/help/topic/com.arm.doc.dui0493a/CJAJJGEH.html"]http://infocenter.arm.com/help/topic/com.a...a/CJAJJGEH.html[/url] you can only have one section marked +FIRST.