Skip to content

Commit

Permalink
Merge tag 'mips-fixes_6.14_2' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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
  • Loading branch information
Linus Torvalds committed Mar 2, 2025
2 parents ece144f + 6d48ad0 commit ebb7d37
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/mips/boot/tools/relocs.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,8 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel,
Elf_Sym *sym, const char *symname))
{
int i;
struct section *extab_sec = sec_lookup("__ex_table");
int extab_index = extab_sec ? extab_sec - secs : -1;

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

if (sec->shdr.sh_info == extab_index)
continue;

sec_symtab = sec->link;
sec_applies = &secs[sec->shdr.sh_info];
if (!(sec_applies->shdr.sh_flags & SHF_ALLOC))
Expand Down

0 comments on commit ebb7d37

Please sign in to comment.