modpost: Fix address calculation in reloc_location()
[cascardo/linux.git] / scripts / mod / modpost.c
index 194e2c4..97d2259 100644 (file)
@@ -1442,7 +1442,7 @@ static unsigned int *reloc_location(struct elf_info *elf,
        int section = shndx2secindex(sechdr->sh_info);
 
        return (void *)elf->hdr + sechdrs[section].sh_offset +
-               r->r_offset - sechdrs[section].sh_addr;
+               r->r_offset;
 }
 
 static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)