diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2025-05-05 13:25:15 +0800 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-05-05 13:25:15 +0800 |
| commit | fba4aafaba8a6ca2bb42e854c37ff9a685ddfd71 (patch) | |
| tree | 4ba74ac925fc7d7b131fa54239b43c00a42a3429 /arch/riscv/kernel/module-sections.c | |
| parent | crypto: s390/sha512 - Fix sha512 state size (diff) | |
| parent | Linux 6.15-rc5 (diff) | |
| download | linux-fba4aafaba8a6ca2bb42e854c37ff9a685ddfd71.tar.gz linux-fba4aafaba8a6ca2bb42e854c37ff9a685ddfd71.zip | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux v6.15-rc5
Merge mainline to pick up bcachefs poly1305 patch 4bf4b5046de0
("bcachefs: use library APIs for ChaCha20 and Poly1305"). This
is a prerequisite for removing the poly1305 shash algorithm.
Diffstat (limited to 'arch/riscv/kernel/module-sections.c')
| -rw-r--r-- | arch/riscv/kernel/module-sections.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/riscv/kernel/module-sections.c b/arch/riscv/kernel/module-sections.c index e264e59e596e..91d0b355ceef 100644 --- a/arch/riscv/kernel/module-sections.c +++ b/arch/riscv/kernel/module-sections.c @@ -73,16 +73,17 @@ static bool duplicate_rela(const Elf_Rela *rela, int idx) static void count_max_entries(Elf_Rela *relas, int num, unsigned int *plts, unsigned int *gots) { - unsigned int type, i; - - for (i = 0; i < num; i++) { - type = ELF_RISCV_R_TYPE(relas[i].r_info); - if (type == R_RISCV_CALL_PLT) { + for (int i = 0; i < num; i++) { + switch (ELF_R_TYPE(relas[i].r_info)) { + case R_RISCV_CALL_PLT: + case R_RISCV_PLT32: if (!duplicate_rela(relas, i)) (*plts)++; - } else if (type == R_RISCV_GOT_HI20) { + break; + case R_RISCV_GOT_HI20: if (!duplicate_rela(relas, i)) (*gots)++; + break; } } } |
