From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120056 invoked by alias); 30 Oct 2015 11:11:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 120044 invoked by uid 89); 30 Oct 2015 11:11:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 30 Oct 2015 11:11:36 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 42D4E347DA2 for ; Fri, 30 Oct 2015 11:11:35 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9UBBXdZ013322; Fri, 30 Oct 2015 07:11:34 -0400 Message-ID: <56335065.1060100@redhat.com> Date: Fri, 30 Oct 2015 15:53:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Kevin Buettner , gdb-patches@sourceware.org Subject: Re: [PATCH] gdb.dwarf2: Define and use gdb_target_symbol_prefix for symbol prefixes References: <20151029212509.438b5642@pinnacle.lan> <20151029222505.3bb590b9@pinnacle.lan> In-Reply-To: <20151029222505.3bb590b9@pinnacle.lan> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-10/txt/msg00758.txt.bz2 On 10/30/2015 05:25 AM, Kevin Buettner wrote: > On Thu, 29 Oct 2015 21:25:09 -0700 > Kevin Buettner wrote: > >> Some of the tests in gdb.dwarf2 which use Dwarf::assemble refer to >> (minimal/linker) symbols created in the course of building a small >> test program. Some targets use a prefix such as underscore ("_") on >> these symbols. Many of the tests in gdb.dwarf2 do not take this into >> account. As a consequence, these tests fail to build, resulting >> either in failures or untested testcases. > > Several of the .S files in gdb.dwarf2 have the same problem. E.g. > when linking the test case for gdb.dwarf2/method-ptr.exp, I see a > linker error "undefined reference to `main'". It appears that crt0 > is generating a reference to _main, but the .S file only provides a > reference to main. > > Any thoughts on what to do about this? Isn't this being addressed by gdb_target_symbol_prefix_flags in the existing tests that use it? E.g., gdb.arch/i386-bp_permanent.c: #ifdef SYMBOL_PREFIX #define SYMBOL(str) SYMBOL_PREFIX #str #else #define SYMBOL(str) #str #endif ... #ifdef __x86_64__ asm(".text\n" " .align 8\n" SYMBOL (standard) ":\n" Thanks, Pedro Alves