From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31865 invoked by alias); 8 Dec 2011 00:45:45 -0000 Received: (qmail 31851 invoked by uid 22791); 8 Dec 2011 00:45:44 -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-a79.g.dreamhost.com) (208.113.200.5) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 08 Dec 2011 00:45:31 +0000 Received: from homiemail-a79.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a79.g.dreamhost.com (Postfix) with ESMTP id 0D4357D4059; Wed, 7 Dec 2011 16:45:17 -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-a79.g.dreamhost.com (Postfix) with ESMTPSA id 4F8817D4055; Wed, 7 Dec 2011 16:45:03 -0800 (PST) Message-ID: <4EE0088C.4070208@eagerm.com> Date: Thu, 08 Dec 2011 00:45: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: gdb@sourceware.org CC: Alan Modra , "Ryan S.Arnold" Subject: Next over function with Secure PLT 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: 2011-12/txt/msg00006.txt.bz2 Hi -- When using PowerPC Secure PLT, trying to "next" over a library function in a shared library does not work correctly. Instead of skipping over the function, gdb steps through the PLT entry which shows up as code in call___do_global_ctors_aux. This doesn't happen when "nexting" over a library function in the executable. Next works the same as with a local function. When reading the executable, ppc_elf_get_synthetic_symtab() calls is_nonpic_glink_stub() to recognizes the PLT stub and then generates internal symbols for each PLT stub like foo@plt. It also creates an entry for __glink and __glink_PLTresolve. If I modify is_nonpic_glink_stub() to recognize the shared library PLT stub format, similar internal symbols are created and gdb seems to work correctly. There's a comment before the call: /* If the stubs are those for -shared/-pie then we might have multiple stubs for each plt entry. If that is the case then there is no way to associate stubs with their plt entries short of figuring out the GOT pointer value used in the stub. */ if (!is_nonpic_glink_stub (abfd, glink, glink_vma - GLINK_ENTRY_SIZE - glink->vma)) What is this trying to tell me? What are the circumstances where there would be multiple stubs for each PLT entry? If there are multiple stubs, then this might create multiple foo@plt symbols with different values. Would this cause any problems? -- Michael Eager eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077