From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4380 invoked by alias); 7 Jan 2012 20:57:29 -0000 Received: (qmail 4371 invoked by uid 22791); 7 Jan 2012 20:57:28 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from caibbdcaaaaf.dreamhost.com (HELO homiemail-a94.g.dreamhost.com) (208.113.200.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 07 Jan 2012 20:57:12 +0000 Received: from homiemail-a94.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a94.g.dreamhost.com (Postfix) with ESMTP id 7125438A06B; Sat, 7 Jan 2012 12:57:10 -0800 (PST) Received: from redwood.eagercon.com (c-76-102-3-160.hsd1.ca.comcast.net [76.102.3.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by homiemail-a94.g.dreamhost.com (Postfix) with ESMTPSA id 3C32238A069; Sat, 7 Jan 2012 12:57:10 -0800 (PST) Message-ID: <4F08B1A6.1000602@eagerm.com> Date: Sat, 07 Jan 2012 20:57:00 -0000 From: Michael Eager User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: Mark Kettenis CC: gdb@sourceware.org, amodra@gmail.com Subject: Re: PowerPC SecurePLT - stepping into library function References: <4F075159.5090508@eagerm.com> <201201062015.q06KF83P031117@glazunov.sibelius.xs4all.nl> <4F075886.9030404@eagerm.com> <201201062056.q06KuBZo001389@glazunov.sibelius.xs4all.nl> In-Reply-To: <201201062056.q06KuBZo001389@glazunov.sibelius.xs4all.nl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00028.txt.bz2 On 01/06/2012 12:56 PM, Mark Kettenis wrote: >> Date: Fri, 06 Jan 2012 12:24:38 -0800 >> From: Michael Eager >> >> https://www.power.org/resources/downloads/Power-Arch-32-bit-ABI-supp-1.0-Linux.pdf > > Thanks! > > I guess you'll have to do some sort of instruction pattern matching. > The ABI document suggests specific code sequences for them, which is > probably what everybody uses to implement them. You might want to > have a look at what is done in mips-linux-tdep.c, since it seems to > have linkage stubs outside of the PLT as well. Actually closer to > home the 64-bit PowerPC stuff seems to do somethings similar. mips and ppc64 seem to do the similar tests, but in different places. mips adds instruction pattern matching to the in_solib_dynsym_resolve() test at infrun.c:4755 so that it succeeds, entering a block of code which skips the symbol resolver. ppc64 does instruction pattern matching to skip over trampoline code, called at infrun.c:4902 but since it calls the same failing in_solib_dynsym_resolve() a couple lines later, I don't think that it has any effect. Looks like doing the same as mips is the best approach. Thanks for the pointer. -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077