From owner-p4-projects@FreeBSD.ORG Fri May 23 19:58:09 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3980D37B404; Fri, 23 May 2003 19:58:09 -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 C77D137B401 for ; Fri, 23 May 2003 19:58:08 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7472D43F3F for ; Fri, 23 May 2003 19:58:08 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4O2w80U013590 for ; Fri, 23 May 2003 19:58:08 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4O2w8Bx013587 for perforce@freebsd.org; Fri, 23 May 2003 19:58:08 -0700 (PDT) Date: Fri, 23 May 2003 19:58:08 -0700 (PDT) Message-Id: <200305240258.h4O2w8Bx013587@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 31756 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: Sat, 24 May 2003 02:58:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=31756 Change 31756 by peter@peter_hammer on 2003/05/23 19:57:24 Ok, this is pretty messed up. _rtld_bind() seems to expect this to be a byte index into the Elf_Rela table. For some reason, amd64 uses it as the Elf_Rela array index. And of course, its in MI code. pre-scale it to make _rtld_bind() happy. Affected files ... .. //depot/projects/hammer/libexec/rtld-elf/amd64/rtld_start.S#10 edit Differences ... ==== //depot/projects/hammer/libexec/rtld-elf/amd64/rtld_start.S#10 (text+ko) ==== @@ -92,6 +92,8 @@ movq 0x50(%rsp),%rdi # Fetch obj argument movq 0x58(%rsp),%rsi # Fetch reloff argument + leaq (%rsi,%rsi,2),%rsi # multiply by 3 + leaq (,%rsi,8),%rsi # now 8, for 24 (sizeof Elf_Rela) call _rtld_bind@PLT # Transfer control to the binder /* Now %rax contains the entry point of the function being called. */