diff --git a/Makefile b/Makefile index d49d96c35ce5055c2f46ed8a9f3c35feef5c9eb2..662e820cfc4ae754f9e82c69a9821401ab0d7eb5 100644 --- a/Makefile +++ b/Makefile @@ -944,7 +944,7 @@ ifdef CONFIG_LOCALVERSION_AUTO localver-extra = $(scm-identifier) else ifneq ($(scm-identifier),) - ifeq ($(LOCALVERSION),) + ifeq ("$(origin LOCALVERSION)", "undefined") localver-extra = + endif endif diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 3318692e4e761ffecaf1849693e376291b5a7655..f8779006986d16a2e39341a7aa66ebf7b8825162 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1342,7 +1342,7 @@ static unsigned int *reloc_location(struct elf_info *elf, int section = sechdr->sh_info; return (void *)elf->hdr + sechdrs[section].sh_offset + - (r->r_offset - sechdrs[section].sh_addr); + r->r_offset - sechdrs[section].sh_addr; } static int addend_386_rel(struct elf_info *elf, Elf_Shdr *sechdr, Elf_Rela *r)