From owner-p4-projects@FreeBSD.ORG Tue Jun 15 01:23:04 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AF05216A4D0; Tue, 15 Jun 2004 01:23:03 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 801A016A4CE for ; Tue, 15 Jun 2004 01:23:03 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78A3443D1D for ; Tue, 15 Jun 2004 01:23:03 +0000 (GMT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5F1N3Zq083959 for ; Tue, 15 Jun 2004 01:23:03 GMT (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5F1N20v083956 for perforce@freebsd.org; Tue, 15 Jun 2004 01:23:02 GMT (envelope-from peter@freebsd.org) Date: Tue, 15 Jun 2004 01:23:02 GMT Message-Id: <200406150123.i5F1N20v083956@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 54972 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jun 2004 01:23:04 -0000 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; }