On Thu, Jan 28, 2016 at 7:15 AM, Christophe Lyon
<christophe.l...@linaro.org> wrote:
> Now, with -mlong-calls, I got:
> drivers/built-in.o: In function `atom_op_mul':
> sunxi_sid.c:(.text+0xa2c334): relocation truncated to fit: R_ARM_CALL
> against symbol `__gnu_mcount_nc' defined in .text section in
> arch/arm/kernel/built-in.o

This is a minor arm port bug.  Use both -mlong-calls and -pg and you get
    bl __gnu_mcount_nc
instead of the long call to mcount that I expected.  The MIPS port
does get this right, and uses a longcall for mcount if longcalls are
enabled.

But you got me thinking about this.  There is a bit of assembly code
in the kernel, and you might run into other similar issues that would
require kernel changes to make this work, so this isn't a trivial
solution, but I think it is still doable if someone cared enough.

I also noticed that the kernel has support for dynamically modifying
code to enable/disable the profiling calls.  That would need changing
to support long calls if you want this kernel to work.  But if an
allyesconfig is only to verify that the kernel builds, this may not
matter.

Jim
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to