SOURCES: module-init-tools-sparc.patch (NEW) - update special symb...
qboosh
qboosh at pld-linux.org
Sun Dec 11 02:07:38 CET 2005
Author: qboosh Date: Sun Dec 11 01:07:38 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- update special symbols mangling on sparc (2.6.14+)
---- Files affected:
SOURCES:
module-init-tools-sparc.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/module-init-tools-sparc.patch
diff -u /dev/null SOURCES/module-init-tools-sparc.patch:1.1
--- /dev/null Sun Dec 11 02:07:38 2005
+++ SOURCES/module-init-tools-sparc.patch Sun Dec 11 02:07:33 2005
@@ -0,0 +1,48 @@
+--- module-init-tools-3.2.2/depmod.c.orig 2005-12-11 00:58:02.030123000 +0000
++++ module-init-tools-3.2.2/depmod.c 2005-12-11 01:04:28.983222674 +0000
+@@ -17,6 +17,7 @@
+ #include <dirent.h>
+ #include <sys/utsname.h>
+ #include <sys/mman.h>
++#include <ctype.h>
+
+ #include "zlibsupport.h"
+ #include "depmod.h"
+@@ -106,18 +107,33 @@
+ struct module *find_symbol(const char *name, const char *modname, int weak)
+ {
+ struct symbol *s;
++ char *tempname = (char *)name;
+
+ /* For our purposes, .foo matches foo. PPC64 needs this. */
+ if (name[0] == '.')
+- name++;
++#ifdef __sparc__
++ { /* special mangling for .div/.mul/.rem/.udiv/.umul/.urem */
++ tempname = strdup(name);
++ tempname[0] = '_';
++ tempname[1] = toupper(name[1]);
++ }
++#else
++ tempname = ++name;
++#endif
+
+- for (s = symbolhash[tdb_hash(name) % SYMBOL_HASH_SIZE]; s; s=s->next) {
+- if (streq(s->name, name))
++ for (s = symbolhash[tdb_hash(tempname) % SYMBOL_HASH_SIZE]; s; s=s->next) {
++ if (streq(s->name, tempname)) {
++ if(tempname != name)
++ free(tempname);
+ return s->owner;
++ }
+ }
+
+ if (print_unknown && !weak)
+- warn("%s needs unknown symbol %s\n", modname, name);
++ warn("%s needs unknown symbol %s\n", modname, tempname);
++
++ if(tempname != name)
++ free(tempname);
+
+ return NULL;
+ }
================================================================
More information about the pld-cvs-commit
mailing list