AnsweredAssumed Answered

gcc -O0 relocation 28 out of range (need new gcc)

Question asked by jesse stone on Dec 25, 2015
Latest reply on Jun 10, 2018 by ALLEN BLAYLOCK

continue this problem how do i solve this problem relocation 28 out of range i.mx6

 

Gcc build kernel in -O0, module's cflag use -O1

[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)

[    0.000000]     vmalloc : 0xc0800000 - 0xff000000   (1000 MB)

[    0.000000]     lowmem  : 0x80000000 - 0xc0000000   (1024 MB)

[    0.000000]     pkmap   : 0x7fe00000 - 0x80000000   (   2 MB)

[    0.000000]     modules : 0x7f000000 - 0x7fe00000   (  14 MB)

[    0.000000]       .text : 0x80008000 - 0x81b47e38   (27904 kB)

[    0.000000]       .init : 0x81b48000 - 0x81c2f6c0   ( 926 kB)

[    0.000000]       .data : 0x81c30000 - 0x81cc75e0   ( 606 kB)

[    0.000000]        .bss : 0x81cc75e0 - 0x81d865fc   ( 765 kB)

.

.

.

[   14.173801] compat: section 2 reloc 4 sym 'genl_unregister_family': relocation 28 out of range (0x7f0000b8 -> 0x811414e4)

 

 

.text part become larger

how do i solve this problem => relocation 28 out of range

 

I TRY add KBUILD_CFLAGS cflag -mlong-calls still failed....

 

how to rearrange code~~~?

my compat section in the /hardware not under the /kernel_imx

modify vmlinux.lds.S ???

or

modify the directory to build code on another place like kernel_imx/drivers?

 

here are some info but not solve problem

 

1. far_away_symbol
Mailing List Archive: Re: ARM: relocation out of range (when loading a module)

2. modify vmlinux.lds.S

Mailing List Archive: Re: ARM: relocation out of range (when loading a module)

3.mlong-calls
[PATCH] ARM: MMUless Core: Fix insmod error - module relocation out of range

Outcomes