It turns out that many compilers don't show section warnings on ARM currently because handling for ARM_CALL relocs are missing from modpost.c. Based on commit c2e26114 ([ARM] 3205/1: Handle new EABI relocations when loading kernel modules) it seems that R_ARM_PC24, R_ARM_CALL and R_ARM_JUMP24 can be handled the same way. Note that at least Debian libc6-dev is missing defines for both R_ARM_CALL and R_ARM_JUMP24 in /usr/include/elf.h. So for now we need to define them in modpost.c if not defined.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -1494,6 +1494,13 @@ static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) · 1493 unmodified lines | ||
| 1494 | 1494 | return 0; |
| 1495 | 1495 | } |
| 1496 | 1496 | |
| 1497 | +#ifndef R_ARM_CALL | |
| 1498 | +#define R_ARM_CALL 28 | |
| 1499 | +#endif | |
| 1500 | +#ifndef R_ARM_JUMP24 | |
| 1501 | +#define R_ARM_JUMP24 29 | |
| 1502 | +#endif | |
| 1503 | + | |
| 1497 | 1504 | static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) |
| 1498 | 1505 | { |
| 1499 | 1506 | unsigned int r_typ = ELF_R_TYPE(r->r_info); |
| @@ -1505,6 +1512,8 @@ static int addend_arm_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r) · 5 unmodified lines | ||
| 1505 | 1512 | (elf->symtab_start + ELF_R_SYM(r->r_info)); |
| 1506 | 1513 | break; |
| 1507 | 1514 | case R_ARM_PC24: |
| 1515 | + case R_ARM_CALL: | |
| 1516 | + case R_ARM_JUMP24: | |
| 1508 | 1517 | /* From ARM ABI: ((S + A) | T) - P */ |
| 1509 | 1518 | r->r_addend = (int)(long)(elf->hdr + |
| 1510 | 1519 | sechdr->sh_offset + |