-
Notifications
You must be signed in to change notification settings - Fork 42
Description
When building with GCC 5, occ fails to link with the following error:
linkscript:28 cannot move location counter backwards (from 00000000fff8122c to 00000000fff80c00)
From the GCC 5.3 build:
$ objdump -h ppc405_irq_core.o
ppc405_irq_core.o: file format elf32-powerpc
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000404 00000000 00000000 00000034 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
...
$ objdump -h ppc405_core.o
ppc405_core.o: file format elf32-powerpc
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000600 00000000 00000000 00000034 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
...
From the GCC 4.9 build:
$ objdump -h ppc405_irq_core.o
ppc405_irq_core.o: file format elf32-powerpc
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000174 00000000 00000000 00000034 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
$ objdump -h ppc405_core.o
ppc405_core.o: file format elf32-powerpc
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000198 00000000 00000000 00000034 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
The text sections are substantially larger in GCC 5.x, resulting in them overflowing the space allocated for them in linkocc.cmd