Keil Logo

ARMLINK: How to analyse linker errors


Information in this knowledgebase article applies to:

  • ArmLink All Versions

QUESTION

When I try to link my application is creating many linker errors, in my case over 100.

Error: L6407E: Sections of aggregate size xxx bytes could not fit into .ANY selector(s)
Not enough information to list image symbols.
Not enough information to list the image map.
Finished: 2 information, 0 warning and 101 error messages.

I do not know how to analyse the linker error output or the linker map file to solve that problem.

ANSWER

When the linker cannot assign a section to a memory it typically a cascade of other error messages that are misleading. It is important to start reviewing the first error message that is output by the linker. In our case it is:

Error: L6406E: No space in execution regions with .ANY selector matching foo.o(.bss).

The error indicates that there is No space for AREA .bss in the object file foo.o. This object file is created by the ARM Compiler and you may open the linker list file to review the content of AREA .bss.

                          AREA ||.bss||, DATA, NOINIT, ALIGN=2

                  aMemory
                          %        2097152

In our case that AREA contains the variable aMemory that uses 2097152 bytes. This is obviously too big for the available RAM in the microcontroller.

When you the open the related source file foo.c you can find the definitions:

//
// Define the available number of bytes available for the GUI
//
#define GUI_NUMBYTES  0x200000
 :
static U32 aMemory[GUI_NUMBYTES / 4];

In this case it is required to adapt the GUI_NUMBYTES to a size that is realistic for a microcontroller, for example 0x4000 which reflects 16KB of RAM.

MORE INFORMATION

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Thursday, April 23, 2015


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.