summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDavid S. Miller <davem@nuts.ninka.net>2003-04-02 23:44:43 -0800
committerDavid S. Miller <davem@nuts.ninka.net>2003-04-02 23:44:43 -0800
commit8b4d8f66184974d3286b19cd17b85c7b6100ef5f (patch)
tree2d4f68cc2530ea39b66dd7f7f0be421987e69323 /scripts
parent11bef0bbd7348babb70176feb76ee3945e4c984f (diff)
[MODULE]: On sparc, ignore undefined symbols of type STT_REGISTER.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/modpost.c6
-rw-r--r--scripts/modpost.h2
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