Skip to content

occ fails to build with GCC 5.2 or 5.3 #8

@deece

Description

@deece

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions