Closed evgeniy-paltsev closed 5 years ago
CC @vineetgarc @abrodkin
BTW, it's enough to build only modules with 2019.03-rc1 toolchain to reproduce this issue. (I.E. build modules with 2019.03-rc1, build the rest of the kernel with 2018.09)
Ok, it's new R_ARC_S8H_PCREL
type of relocation.
We need to add support of this relocation type to the our module.c
No need to do such an operation for the time being. The following relocs have being introduced to support linker-time relaxation:
Enum | ELF Reloc Type | Description | Details |
---|---|---|---|
80 | R_ARC_S9H_PCREL | PC-relative | bits9 = ME ( ( ( ( S + A ) - P ) >> 1 ) ) ) |
81 | R_ARC_S7H_PCREL | PC-relative | bits7 = (( S + A ) - P ) >> 1 |
82 | R_ARC_S8H_PCREL | PC-relative | disp8h = (( S + A ) - P ) >> 1 |
83 | R_ARC_S10H_PCREL | PC-relative | bits10 = (( S + A ) - P ) >> 1 |
84 | R_ARC_S13H_PCREL | PC-relative | bits13 = ME ( ( ( ( S + A ) - P ) >> 1 ) ) ) |
85 | R_ARC_ALIGN | Alignment statement | |
86 | R_ARC_ADD8 | 8-bit label addition | word8 = S + A |
87 | R_ARC_ADD16 | 16-bit label addition | word16 = S + A |
88 | R_ARC_SUB8 | 8-bit label subtraction | word8 = S - A |
89 | R_ARC_SUB16 | 16-bit label subtraction | word16 = S - A |
90 | R_ARC_SUB32 | 32-bit label subtraction | word32 = S - A |
A binutils patch will be added to make the tools to behave as "before" when the linker relaxation is not required.
Kernel nodules loading works fine if we build modules with 2019.03-rc2 toolchain.
If we build kernel with 2019.03-rc1 toolchain we get errors on modules loading.
I.E:
Everything works fine with previous toolchain (2018.09). This issue can be reproduced on different versions of kernel (I've tried 4.19.9, 4.20)