@@ -1211,7 +1211,7 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,
12111211 }
12121212}
12131213
1214- static void check_section_mismatch (const char * modname , struct elf_info * elf ,
1214+ static void check_section_mismatch (struct module * mod , struct elf_info * elf ,
12151215 Elf_Sym * sym ,
12161216 unsigned int fsecndx , const char * fromsec ,
12171217 Elf_Addr faddr , Elf_Addr taddr )
@@ -1222,7 +1222,7 @@ static void check_section_mismatch(const char *modname, struct elf_info *elf,
12221222 if (!mismatch )
12231223 return ;
12241224
1225- default_mismatch_handler (modname , elf , mismatch , sym ,
1225+ default_mismatch_handler (mod -> name , elf , mismatch , sym ,
12261226 fsecndx , fromsec , faddr ,
12271227 tosec , taddr );
12281228}
@@ -1406,7 +1406,7 @@ static int addend_mips_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
14061406#define R_LARCH_SUB32 55
14071407#endif
14081408
1409- static void section_rela (const char * modname , struct elf_info * elf ,
1409+ static void section_rela (struct module * mod , struct elf_info * elf ,
14101410 Elf_Shdr * sechdr )
14111411{
14121412 Elf_Rela * rela ;
@@ -1452,12 +1452,12 @@ static void section_rela(const char *modname, struct elf_info *elf,
14521452 break ;
14531453 }
14541454
1455- check_section_mismatch (modname , elf , elf -> symtab_start + r_sym ,
1455+ check_section_mismatch (mod , elf , elf -> symtab_start + r_sym ,
14561456 fsecndx , fromsec , r .r_offset , r .r_addend );
14571457 }
14581458}
14591459
1460- static void section_rel (const char * modname , struct elf_info * elf ,
1460+ static void section_rel (struct module * mod , struct elf_info * elf ,
14611461 Elf_Shdr * sechdr )
14621462{
14631463 Elf_Rel * rel ;
@@ -1507,7 +1507,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
15071507 fatal ("Please add code to calculate addend for this architecture\n" );
15081508 }
15091509
1510- check_section_mismatch (modname , elf , elf -> symtab_start + r_sym ,
1510+ check_section_mismatch (mod , elf , elf -> symtab_start + r_sym ,
15111511 fsecndx , fromsec , r .r_offset , r .r_addend );
15121512 }
15131513}
@@ -1524,19 +1524,19 @@ static void section_rel(const char *modname, struct elf_info *elf,
15241524 * to find all references to a section that reference a section that will
15251525 * be discarded and warns about it.
15261526 **/
1527- static void check_sec_ref (const char * modname , struct elf_info * elf )
1527+ static void check_sec_ref (struct module * mod , struct elf_info * elf )
15281528{
15291529 int i ;
15301530 Elf_Shdr * sechdrs = elf -> sechdrs ;
15311531
15321532 /* Walk through all sections */
15331533 for (i = 0 ; i < elf -> num_sections ; i ++ ) {
1534- check_section (modname , elf , & elf -> sechdrs [i ]);
1534+ check_section (mod -> name , elf , & elf -> sechdrs [i ]);
15351535 /* We want to process only relocation sections and not .init */
15361536 if (sechdrs [i ].sh_type == SHT_RELA )
1537- section_rela (modname , elf , & elf -> sechdrs [i ]);
1537+ section_rela (mod , elf , & elf -> sechdrs [i ]);
15381538 else if (sechdrs [i ].sh_type == SHT_REL )
1539- section_rel (modname , elf , & elf -> sechdrs [i ]);
1539+ section_rel (mod , elf , & elf -> sechdrs [i ]);
15401540 }
15411541}
15421542
@@ -1707,7 +1707,7 @@ static void read_symbols(const char *modname)
17071707 sym_get_data (& info , sym ));
17081708 }
17091709
1710- check_sec_ref (modname , & info );
1710+ check_sec_ref (mod , & info );
17111711
17121712 if (!mod -> is_vmlinux ) {
17131713 version = get_modinfo (& info , "version" );
0 commit comments