Author Topic: Overlapping Sectors when building.  (Read 11833 times)

Offline phomann

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Homann Designs
Overlapping Sectors when building.
« on: November 19, 2009, 04:26:07 AM »
Hi,

Can anyone help out here. When I'm linking with GCC (Code Sorcery) I'm having trouble with overlapping sectors. Does anyone know how to fix this or what it means?

Code: [Select]
arm-none-eabi-gcc -mcpu=cortex-m3 -mlittle-endian -mthumb -Wall -Wstrict-prototypes -I../../uTaskerV1.4 -D _GNU -D _LM3SXXXX -g -Os -Wl,-Map=uTaskerV1.4.map --no-gc-sections -nostartfiles -TuTaskerLM3SXXXX.ld -o uTaskerV1.4.elf Build/application.o Build/debug.o Build/webInterface.o Build/KeyScan.o Build/CGLCD.o Build/GLCD.o Build/LCD.o Build/NetworkIndicator.o Build/usb_application.o Build/LM3SXXXX.o Build/MODBUS.o Build/modbus_app.o Build/eth_drv.o Build/Driver.o Build/uMalloc.o Build/uTasker.o Build/Tty_drv.o Build/iic_drv.o Build/USB_drv.o Build/uFile.o Build/watchdog.o Build/GlobalTimer.o Build/low_power.o Build/Ethernet.o Build/arp.o Build/dhcp.o Build/dns.o Build/ftp.o Build/http.o Build/icmp.o Build/ip_utils.o Build/ip.o Build/pop3.o Build/smtp.o Build/snmp.o Build/tcp.o Build/telnet.o Build/tftp.o Build/udp.o Build/webutils.o Build/NetBIOS.o Build/iap.o Build/io.o Build/lib.o Build/basic.o Build/DataMap.o Build/ModIP_app.o Build/Basic_app.o
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/bin/ld.exe: section .rodata [00000004 -> 00003213] overlaps section .vectors [00000000 -> 00000007]
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/bin/ld.exe: section .text [00000008 -> 000127eb] overlaps section .rodata [00000004 -> 00003213]
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/bin/ld.exe: section .data [00003214 -> 000037ff] overlaps section .text [00000008 -> 000127eb]
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/bin/ld.exe: uTaskerV1.4.elf: section .rodata lma 0x4 overlaps previous sections
c:/program files/codesourcery/sourcery g++ lite/bin/../lib/gcc/arm-none-eabi/4.2.3/../../../../arm-none-eabi/bin/ld.exe: uTaskerV1.4.elf: section .text lma 0x8 overlaps previous sections
collect2: ld returned 1 exit status
cs-make: *** [uTaskerV1.4.elf] Error 1

Cheers,

Peter.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: Overlapping Sectors when building.
« Reply #1 on: November 19, 2009, 03:27:05 PM »
Hi Peter

The linker seems to believe that it should put the various sections (code, initialised data and consts) to areas which are overlapping. Have you modified the linker script file when this started? Or is is due to the code size growing beyond the available space limits?
Try to remove some code and see whether it then links again - check the size and position of the used sections in the MAP file and then check how much space is remaining. Perhaps you will see that the available space is really getting full and the overlapping is due to an overflow (?)

Regards

Mark

Offline paulk

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Overlapping Sectors when building.
« Reply #2 on: November 19, 2009, 05:39:22 PM »
I don't have too much to add here, other than wanting to understand these errors myself.

What's strange is that the .rodata and .text sections seem to be starting at very low offsets (thereby causing the overlaps).  Can you attach your .ld script?

Offline phomann

  • Newbie
  • *
  • Posts: 47
    • View Profile
    • Homann Designs
Re: Overlapping Sectors when building.
« Reply #3 on: November 20, 2009, 05:09:23 AM »
Hi ,

Thanks for the replies. Yes, I've added in quite a bit of code , but was not sure if it was due to some of the sections being used for the first time and the errors showing up.

The .ld fine was not altered to cause it to occur. I was expecting that the assert checks for memory overflow would have fired if a segment was too large.

I'll try to remove some code and see what happens.

Thanks,


Peter.