From owner-p4-projects@FreeBSD.ORG Mon May 17 12:55:04 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E3F4E16A4D0; Mon, 17 May 2004 12:55:03 -0700 (PDT) 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 B1F9A16A4CE for ; Mon, 17 May 2004 12:55:03 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 801DA43D2D for ; Mon, 17 May 2004 12:55:03 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i4HJt3Ge053206 for ; Mon, 17 May 2004 12:55:03 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i4HJt2Pl053203 for perforce@freebsd.org; Mon, 17 May 2004 12:55:02 -0700 (PDT) (envelope-from peter@freebsd.org) Date: Mon, 17 May 2004 12:55:02 -0700 (PDT) Message-Id: <200405171955.i4HJt2Pl053203@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 52941 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: Mon, 17 May 2004 19:55:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=52941 Change 52941 by peter@peter_hammer on 2004/05/17 12:55:01 deal with REL records which have variable old-value sizes Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/elf_machdep.c#25 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/elf_machdep.c#25 (text+ko) ==== @@ -119,9 +119,18 @@ case ELF_RELOC_REL: rel = (const Elf_Rel *)data; where = (Elf_Addr *) (relocbase + rel->r_offset); - addend = *where; rtype = ELF_R_TYPE(rel->r_info); symidx = ELF_R_SYM(rel->r_info); + /* Addend is 32 bit on 32 bit relocs */ + switch (rtype) { + case R_X86_64_PC32: + case R_X86_64_32S: + addend = *(Elf32_Addr *)where; + break; + default: + addend = *where; + break; + } break; case ELF_RELOC_RELA: rela = (const Elf_Rela *)data; @@ -136,7 +145,6 @@ switch (rtype) { - case R_X86_64_NONE: /* none */ break;