diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/modpost.c | 6 | ||||
| -rw-r--r-- | scripts/modpost.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/scripts/modpost.c b/scripts/modpost.c index 2d19dcdafd60..1b94b2c73b28 100644 --- a/scripts/modpost.c +++ b/scripts/modpost.c @@ -296,6 +296,12 @@ handle_modversions(struct module *mod, struct elf_info *info, /* ignore global offset table */ if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0) break; + if (info->hdr->e_machine == EM_SPARC || + info->hdr->e_machine == EM_SPARCV9) { + /* Ignore register directives. */ + if (ELF_ST_TYPE(sym->st_info) == STT_REGISTER) + break; + } if (memcmp(symname, MODULE_SYMBOL_PREFIX, strlen(MODULE_SYMBOL_PREFIX)) == 0) { diff --git a/scripts/modpost.h b/scripts/modpost.h index 1a5c8e829cc8..586108179780 100644 --- a/scripts/modpost.h +++ b/scripts/modpost.h @@ -17,6 +17,7 @@ #define Elf_Shdr Elf32_Shdr #define Elf_Sym Elf32_Sym #define ELF_ST_BIND ELF32_ST_BIND +#define ELF_ST_TYPE ELF32_ST_TYPE #else @@ -24,6 +25,7 @@ #define Elf_Shdr Elf64_Shdr #define Elf_Sym Elf64_Sym #define ELF_ST_BIND ELF64_ST_BIND +#define ELF_ST_TYPE ELF64_ST_TYPE #endif |
