Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 2004 01:23:02 GMT
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 54972 for review
Message-ID:  <200406150123.i5F1N20v083956@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=54972

Change 54972 by peter@peter_hammer on 2004/06/15 01:22:28

	really fix amd64 kld modules this time.

Affected files ...

.. //depot/projects/hammer/sys/kern/link_elf_obj.c#39 edit

Differences ...

==== //depot/projects/hammer/sys/kern/link_elf_obj.c#39 (text+ko) ====

@@ -747,12 +747,17 @@
 link_elf_symbol_values(linker_file_t lf, c_linker_sym_t sym,
     linker_symval_t *symval)
 {
+	Elf_Addr base;
 	elf_file_t ef = (elf_file_t) lf;
 	const Elf_Sym *es = (const Elf_Sym*) sym;
 
+
 	if (es >= ef->ddbsymtab && es < (ef->ddbsymtab + ef->ddbsymcnt)) {
+		base = findbase(ef, es->st_shndx);
+		if (base == 0)
+			base = (Elf_Addr)ef->address;
 		symval->name = ef->ddbstrtab + es->st_name;
-		symval->value = (caddr_t) ef->address + es->st_value;
+		symval->value = (caddr_t)base + es->st_value;
 		symval->size = es->st_size;
 		return 0;
 	}
@@ -878,6 +883,8 @@
 				break;
 			}
 		}
+		if (ret == 0)
+			return (0);
 		return ret + sym->st_value;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406150123.i5F1N20v083956>