diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 14:01:25 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 14:01:25 +0200 |
commit | d7f6884ae0ae6e406ec3500fcde16e8f51642460 (patch) | |
tree | efceb246a4fa12921b7dbd3946a88fa257684405 /scripts/mod/modpost.c | |
parent | [PATCH] sky2: new experimental Marvell Yukon2 driver (diff) | |
parent | Linux 2.6.14-rc1 (diff) | |
download | linux-d7f6884ae0ae6e406ec3500fcde16e8f51642460.tar.xz linux-d7f6884ae0ae6e406ec3500fcde16e8f51642460.zip |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r-- | scripts/mod/modpost.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 9b9f94c915d2..3bed09e625c0 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -359,12 +359,23 @@ handle_modversions(struct module *mod, struct elf_info *info, /* ignore __this_module, it will be resolved shortly */ if (strcmp(symname, MODULE_SYMBOL_PREFIX "__this_module") == 0) break; -#ifdef STT_REGISTER +/* cope with newer glibc (2.3.4 or higher) STT_ definition in elf.h */ +#if defined(STT_REGISTER) || defined(STT_SPARC_REGISTER) +/* add compatibility with older glibc */ +#ifndef STT_SPARC_REGISTER +#define STT_SPARC_REGISTER STT_REGISTER +#endif 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) + if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER) break; + if (symname[0] == '.') { + char *munged = strdup(symname); + munged[0] = '_'; + munged[1] = toupper(munged[1]); + symname = munged; + } } #endif |