aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKeith M. Wesolowski <wesolows@foobazco.org>2004-03-29 07:41:46 -0800
committerKeith M. Wesolowski <wesolows@foobazco.org>2004-03-29 07:41:46 -0800
commit2ec523a38e875d5acdc67ffa0944e762e8bbdfd2 (patch)
treeada54180bf86c3ee3b241f268a28d84bf0bdd236 /scripts
parent8e764e0dca9b439b13cf0d6334badbfa6aa59762 (diff)
downloadhistory-2ec523a38e875d5acdc67ffa0944e762e8bbdfd2.tar.gz
[SPARC32]: Update module linking for symbols starting with "."
Rusty did not like the __dot_sym approach and suggested instead: 1) make rem, urem, mul, umul, div and udiv aliases to .rem, .urem etc: extern int rem(int, int) __attribute__((weak,alias(".rem"))); 2) EXPORT_SYMBOL(rem) etc. 3) Check genksyms recognises that prototype (it should). 4) Copy "dedotify" from ppc64 to handle them on load. The only real downside is the risk that someone else will export those names, but I think that's pretty unlikely.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/modpost.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/scripts/modpost.c b/scripts/modpost.c
index 6f5848592669d..a0976fcb99823 100644
--- a/scripts/modpost.c
+++ b/scripts/modpost.c
@@ -141,26 +141,14 @@ new_symbol(const char *name, struct module *module, unsigned int *crc)
symbolhash[hash] = new;
}
-#define DOTSYM_PFX "__dot_"
-
struct symbol *
find_symbol(const char *name)
{
struct symbol *s;
- char dotname[64 + sizeof(DOTSYM_PFX)];
- /* .foo matches foo. PPC64 needs this. */
- if (name[0] == '.') {
+ /* For our purposes, .foo matches foo. PPC64 needs this. */
+ if (name[0] == '.')
name++;
- strcpy(dotname, DOTSYM_PFX);
- strncat(dotname, name, sizeof(dotname) - sizeof(DOTSYM_PFX) - 1);
- dotname[sizeof(dotname)-1] = 0;
- /* Sparc32 wants .foo to match __dot_foo, try this first. */
- for (s = symbolhash[tdb_hash(dotname) % SYMBOL_HASH_SIZE]; s; s=s->next) {
- if (strcmp(s->name, dotname) == 0)
- return s;
- }
- }
for (s = symbolhash[tdb_hash(name) % SYMBOL_HASH_SIZE]; s; s=s->next) {
if (strcmp(s->name, name) == 0)