On 27 January 2016 at 18:49, Jim Wilson <jim.wil...@linaro.org> wrote:
> On Wed, Jan 27, 2016 at 9:30 AM, Richard Earnshaw
> <richard.earns...@arm.com> wrote:
>> Long calls would probably solve the problem, but would likely be
>> horribly expensive in performance.
>
> An allyesconfig is presumably only to verify that you haven't
> accidentally broken any build config with a patch, so performance
> should not be a concern.
>
>> The best solution would be to have an option to prevent ld -r from
>> merging like-named sections (instead just aggregating multiple sections
>> with similar names into one object file).  This is possible in ELF.
>
> Another way to do this is to make an archive file instead of using ld
> -r, and then use --whole-archive <archivefile> --no-whole-archive.
> That would avoid the need for linker changes.
>
> While it might be possible to make an ELF file with multiple sections
> with the same name, that would likely confuse lots of tools, and
> require cascading changes, which could get ugly.
>
> Jim

I've just tried with-ffunction-sections, but I got:
drivers/built-in.o:(.text.fixup+0x264): relocation truncated to fit:
R_ARM_JUMP24 against `.text.armada_gem_pwrite_ioctl'
drivers/built-in.o:(.text.fixup+0x270): relocation truncated to fit:
R_ARM_JUMP24 against `.text.armada_gem_pwrite_ioctl'
drivers/built-in.o:(.text.fixup+0x278): relocation truncated to fit:
R_ARM_JUMP24 against `.text.scsi_ioctl'
drivers/built-in.o:(.text.fixup+0x280): relocation truncated to fit:
R_ARM_JUMP24 against `.text.scsi_ioctl'
drivers/built-in.o:(.text.fixup+0x288): relocation truncated to fit:
R_ARM_JUMP24 against `.text.sg_ioctl'
drivers/built-in.o:(.text.fixup+0x290): relocation truncated to fit:
R_ARM_JUMP24 against `.text.sg_ioctl'
drivers/built-in.o:(.text.fixup+0x298): relocation truncated to fit:
R_ARM_JUMP24 against `.text.sg_ioctl'
drivers/built-in.o:(.text.fixup+0x2a0): relocation truncated to fit:
R_ARM_JUMP24 against `.text.sg_ioctl'
drivers/built-in.o:(.text.fixup+0x2a8): relocation truncated to fit:
R_ARM_JUMP24 against `.text.sg_ioctl'
drivers/built-in.o:(.text.fixup+0x2b0): relocation truncated to fit:
R_ARM_JUMP24 against `.text.sg_ioctl'
drivers/built-in.o:(.text.fixup+0x2b8): additional relocation
overflows omitted from the output

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
drivers/built-in.o: In function `atom_op_move':
sunxi_sid.c:(.text+0xa2c4d4): relocation truncated to fit: R_ARM_CALL
against symbol `__gnu_mcount_nc' defined in .text section in
arch/arm/kernel/built-in.o
drivers/built-in.o: In function `atom_op_mask':
sunxi_sid.c:(.text+0xa2c830): relocation truncated to fit: R_ARM_CALL
against symbol `__gnu_mcount_nc' defined in .text section in
arch/arm/kernel/built-in.o
drivers/built-in.o: In function `atom_op_div':
sunxi_sid.c:(.text+0xa2cb1c): relocation truncated to fit: R_ARM_CALL
against symbol `__gnu_mcount_nc' defined in .text section in
arch/arm/kernel/built-in.o
drivers/built-in.o: In function `atom_op_compare':
sunxi_sid.c:(.text+0xa2cd10): relocation truncated to fit: R_ARM_CALL
against symbol `__gnu_mcount_nc' defined in .text section in
arch/arm/kernel/built-in.o
drivers/built-in.o: In function `atom_op_and':
sunxi_sid.c:(.text+0xa2cfa0): relocation truncated to fit: R_ARM_CALL
against symbol `__gnu_mcount_nc' defined in .text section in
arch/arm/kernel/built-in.o
drivers/built-in.o: In function `atom_op_add':
sunxi_sid.c:(.text+0xa2d1e0): relocation truncated to fit: R_ARM_CALL
against symbol `__gnu_mcount_nc' defined in .text section in
arch/arm/kernel/built-in.o
drivers/built-in.o: In function `atom_op_delay':
sunxi_sid.c:(.text+0xa2d41c): relocation truncated to fit: R_ARM_CALL
against symbol `__gnu_mcount_nc' defined in .text section in
arch/arm/kernel/built-in.o
drivers/built-in.o: In function `atom_op_jump':
sunxi_sid.c:(.text+0xa2d624): relocation truncated to fit: R_ARM_CALL
against symbol `__gnu_mcount_nc' defined in .text section in
arch/arm/kernel/built-in.o
drivers/built-in.o: In function `amdgpu_atom_execute_table_locked':
sunxi_sid.c:(.text+0xa2da2c): relocation truncated to fit: R_ARM_CALL
against symbol `__gnu_mcount_nc' defined in .text section in
arch/arm/kernel/built-in.o

Which is surprising. But maybe I didn't add -mlong-calls where I
should have and some files were compiled without it, or there are asm
fragments using direct calls?

So... it looks like there is no straight forward route.

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

Reply via email to