@@ -1211,7 +1211,7 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf,
1211
1211
}
1212
1212
}
1213
1213
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 ,
1215
1215
Elf_Sym * sym ,
1216
1216
unsigned int fsecndx , const char * fromsec ,
1217
1217
Elf_Addr faddr , Elf_Addr taddr )
@@ -1222,7 +1222,7 @@ static void check_section_mismatch(const char *modname, struct elf_info *elf,
1222
1222
if (!mismatch )
1223
1223
return ;
1224
1224
1225
- default_mismatch_handler (modname , elf , mismatch , sym ,
1225
+ default_mismatch_handler (mod -> name , elf , mismatch , sym ,
1226
1226
fsecndx , fromsec , faddr ,
1227
1227
tosec , taddr );
1228
1228
}
@@ -1406,7 +1406,7 @@ static int addend_mips_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)
1406
1406
#define R_LARCH_SUB32 55
1407
1407
#endif
1408
1408
1409
- static void section_rela (const char * modname , struct elf_info * elf ,
1409
+ static void section_rela (struct module * mod , struct elf_info * elf ,
1410
1410
Elf_Shdr * sechdr )
1411
1411
{
1412
1412
Elf_Rela * rela ;
@@ -1452,12 +1452,12 @@ static void section_rela(const char *modname, struct elf_info *elf,
1452
1452
break ;
1453
1453
}
1454
1454
1455
- check_section_mismatch (modname , elf , elf -> symtab_start + r_sym ,
1455
+ check_section_mismatch (mod , elf , elf -> symtab_start + r_sym ,
1456
1456
fsecndx , fromsec , r .r_offset , r .r_addend );
1457
1457
}
1458
1458
}
1459
1459
1460
- static void section_rel (const char * modname , struct elf_info * elf ,
1460
+ static void section_rel (struct module * mod , struct elf_info * elf ,
1461
1461
Elf_Shdr * sechdr )
1462
1462
{
1463
1463
Elf_Rel * rel ;
@@ -1507,7 +1507,7 @@ static void section_rel(const char *modname, struct elf_info *elf,
1507
1507
fatal ("Please add code to calculate addend for this architecture\n" );
1508
1508
}
1509
1509
1510
- check_section_mismatch (modname , elf , elf -> symtab_start + r_sym ,
1510
+ check_section_mismatch (mod , elf , elf -> symtab_start + r_sym ,
1511
1511
fsecndx , fromsec , r .r_offset , r .r_addend );
1512
1512
}
1513
1513
}
@@ -1524,19 +1524,19 @@ static void section_rel(const char *modname, struct elf_info *elf,
1524
1524
* to find all references to a section that reference a section that will
1525
1525
* be discarded and warns about it.
1526
1526
**/
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 )
1528
1528
{
1529
1529
int i ;
1530
1530
Elf_Shdr * sechdrs = elf -> sechdrs ;
1531
1531
1532
1532
/* Walk through all sections */
1533
1533
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 ]);
1535
1535
/* We want to process only relocation sections and not .init */
1536
1536
if (sechdrs [i ].sh_type == SHT_RELA )
1537
- section_rela (modname , elf , & elf -> sechdrs [i ]);
1537
+ section_rela (mod , elf , & elf -> sechdrs [i ]);
1538
1538
else if (sechdrs [i ].sh_type == SHT_REL )
1539
- section_rel (modname , elf , & elf -> sechdrs [i ]);
1539
+ section_rel (mod , elf , & elf -> sechdrs [i ]);
1540
1540
}
1541
1541
}
1542
1542
@@ -1707,7 +1707,7 @@ static void read_symbols(const char *modname)
1707
1707
sym_get_data (& info , sym ));
1708
1708
}
1709
1709
1710
- check_sec_ref (modname , & info );
1710
+ check_sec_ref (mod , & info );
1711
1711
1712
1712
if (!mod -> is_vmlinux ) {
1713
1713
version = get_modinfo (& info , "version" );
0 commit comments