aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r--scripts/mod/modpost.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 29c89a6bad3d..4dedd0d3d3a7 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -621,6 +621,16 @@ static void handle_modversions(struct module *mod, struct elf_info *info,
621 if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { 621 if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
622 is_crc = true; 622 is_crc = true;
623 crc = (unsigned int) sym->st_value; 623 crc = (unsigned int) sym->st_value;
624 if (sym->st_shndx != SHN_UNDEF && sym->st_shndx != SHN_ABS) {
625 unsigned int *crcp;
626
627 /* symbol points to the CRC in the ELF object */
628 crcp = (void *)info->hdr + sym->st_value +
629 info->sechdrs[sym->st_shndx].sh_offset -
630 (info->hdr->e_type != ET_REL ?
631 info->sechdrs[sym->st_shndx].sh_addr : 0);
632 crc = *crcp;
633 }
624 sym_update_crc(symname + strlen(CRC_PFX), mod, crc, 634 sym_update_crc(symname + strlen(CRC_PFX), mod, crc,
625 export); 635 export);
626 } 636 }