I've been using ld.bfd 2.24.90 from NDK r10e without this issue, but after updating to r11 the new binutils consistently uses the R_ARM_COPY relocation for __sF. I'm building the object file that refers to __sF from D, using the llvm-based ldc compiler. However, the exact same object file is linked without R_ARM_COPY by both the older ld.bfd 2.24.90 or a newer 2.26.20160125 that I have locally installed, so this is probably a regression in ld.bfd 2.25.51. I don't have this issue with ld.gold in NDK r11, but I'm stuck with ld.bfd because I need a certain ELF section ordering.
For reference, here are the relocations in the stdio.o object file that refers to __sF:
Relocation section '.rel.data.stdin' at offset 0x800 contains 1 entries:
Offset Info Type Sym.Value Sym. Name
00000000 00004602 R_ARM_ABS32 00000000 __sF
Relocation section '.rel.data.stdout' at offset 0x808 contains 1 entries:
Offset Info Type Sym.Value Sym. Name
00000000 00004602 R_ARM_ABS32 00000000 __sF
Relocation section '.rel.data.stderr' at offset 0x810 contains 1 entries:
Offset Info Type Sym.Value Sym. Name
00000000 00004602 R_ARM_ABS32 00000000 __sF
This produces the following relocation in the final command-line executable:
0178a1c0 0000b214 R_ARM_COPY 0178a1c0 __sF
Running that executable fails with an error about R_ARM_COPY not being supported. I'm unsure how to reproduce this using a C/C++ sample, but I'm guessing it might be a problem there too? I don't know enough about ELF relocations to say.
I've been using ld.bfd 2.24.90 from NDK r10e without this issue, but after updating to r11 the new binutils consistently uses the
R_ARM_COPYrelocation for__sF. I'm building the object file that refers to__sFfrom D, using the llvm-based ldc compiler. However, the exact same object file is linked withoutR_ARM_COPYby both the older ld.bfd 2.24.90 or a newer 2.26.20160125 that I have locally installed, so this is probably a regression in ld.bfd 2.25.51. I don't have this issue with ld.gold in NDK r11, but I'm stuck with ld.bfd because I need a certain ELF section ordering.For reference, here are the relocations in the stdio.o object file that refers to
__sF:This produces the following relocation in the final command-line executable:
Running that executable fails with an error about
R_ARM_COPYnot being supported. I'm unsure how to reproduce this using a C/C++ sample, but I'm guessing it might be a problem there too? I don't know enough about ELF relocations to say.