Skip to content

Commit ebb7d37

Browse files
committed
Merge tag 'mips-fixes_6.14_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS fix from Thomas Bogendoerfer: "Fix fallout of /scripts/sorttable cleanup" * tag 'mips-fixes_6.14_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Ignore relocs against __ex_table for relocatable kernel
2 parents ece144f + 6d48ad0 commit ebb7d37

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/mips/boot/tools/relocs.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,8 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
468468
Elf_Sym *sym, const char *symname))
469469
{
470470
int i;
471+
struct section *extab_sec = sec_lookup("__ex_table");
472+
int extab_index = extab_sec ? extab_sec - secs : -1;
471473

472474
/* Walk through the relocations */
473475
for (i = 0; i < ehdr.e_shnum; i++) {
@@ -480,6 +482,9 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
480482
if (sec->shdr.sh_type != SHT_REL_TYPE)
481483
continue;
482484

485+
if (sec->shdr.sh_info == extab_index)
486+
continue;
487+
483488
sec_symtab = sec->link;
484489
sec_applies = &secs[sec->shdr.sh_info];
485490
if (!(sec_applies->shdr.sh_flags & SHF_ALLOC))

0 commit comments

Comments
 (0)