modutils-24: [mips] modutlis-24 segfault fix for 2.4 kernel modules
authorRalf Rösch <ralf.roesch@rw-gmbh.de>
Wed, 14 Apr 2010 16:45:37 +0000 (09:45 -0700)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 14 Apr 2010 16:45:37 +0000 (09:45 -0700)
handling DWARF sections solves the problem.

This seems to be a long outstanding bug:
http://permalink.gmane.org/gmane.linux.busybox/4533
http://www.linux-mips.org/archives/linux-mips/2004-08/msg00072.html

Signed-off-by: Ralf Rösch <ralf.roesch@rw-gmbh.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
modutils/modutils-24.c

index 05c1bf2..5c1611c 100644 (file)
@@ -3285,6 +3285,9 @@ static struct obj_file *obj_load(char *image, size_t image_size, int loadprogbit
                        case SHT_SYMTAB:
                        case SHT_STRTAB:
                        case SHT_RELM:
+#if defined(__mips__)
+                       case SHT_MIPS_DWARF:
+#endif
                                sec->contents = NULL;
                                if (sec->header.sh_size > 0) {
                                        sec->contents = xmalloc(sec->header.sh_size);