Mark Butcher

ARM.exidx OVERLAP issue

Discussion created by Mark Butcher on Aug 24, 2016
Latest reply on Sep 1, 2016 by Mark Butcher

Hi All

When adding a foreign library we now get a linker error due to code overlapping with the reset vector (code linker to start at 0x5080 due to boot loader at 0x0000).

This is the linker error

c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/../../../../arm-none-eabi/bin/ld.exe: section .ARM loaded at [00005080,00005087] overlaps section .vectors loaded at [00005080,00005087]

and this is the map file showing that libgcc.a is locating something there:

 

.ARM.exidx      0x00005080        0x8
 .ARM.exidx     0x00005080        0x8 c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/armv6-m\libgcc.a(_divdi3.o)
 .ARM.exidx     0x00005088        0x0 c:/freescale/kds_3.0.0/toolchain/bin/../lib/gcc/arm-none-eabi/4.8.4/armv6-m\libgcc.a(_udivdi3.o)
                                  0x8 (size before relaxing)

 

 

According to various sources this has something to do with stack-unwinding debug support but various suggestions as to how it may be disabled have not had any effect.

In the linker script file there is a section:

      .ARM.extab   : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
       .ARM : {
       __exidx_start = .;
         *(.ARM.exidx*)
         __exidx_end = .;
       } >FLASH

but the result is the same with or without this. It looks to be correctly telling the linker to put whatever this is into the flash:

MEMORY
{
    FLASH (rx) : ORIGIN = 0x00005080, LENGTH = 0x00040000-0x5080
    SRAM (wx)  : ORIGIN = 0x1fffe0c0, LENGTH = 0x00008000-0xc0
}

but why on earth is it overlapping with other things in this single case?

Anyone know anything about this and how to get rid of it....?

 

Regards

Mark

Outcomes