From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26832 invoked by alias); 17 May 2006 20:23:53 -0000 Received: (qmail 26818 invoked by uid 22791); 17 May 2006 20:23:53 -0000 X-Spam-Check-By: sourceware.org Received: from w099.z064220152.sjc-ca.dsl.cnc.net (HELO duck.specifix.com) (64.220.152.99) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 17 May 2006 20:23:51 +0000 Received: from [::1] (duck.specifix.com [64.220.152.99]) by duck.specifix.com (Postfix) with ESMTP id 9A3BDFCB3; Wed, 17 May 2006 13:23:49 -0700 (PDT) From: Fred Fish Reply-To: fnf@specifix.com To: Richard Sandiford Subject: Re: [RFC] Passing MIPS debug hints between gcc and gdb Date: Wed, 17 May 2006 20:32:00 -0000 User-Agent: KMail/1.9.1 Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org References: <200605101206.01433.fnf@specifix.com> <87y7x9aw12.fsf@talisman.home> In-Reply-To: <87y7x9aw12.fsf@talisman.home> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200605171624.16372.fnf@specifix.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00391.txt.bz2 On Thursday 11 May 2006 02:57, Richard Sandiford wrote: > Using empty sections was always a hack, to be honest (modelled on the > old .gcc_compiled_v3 thing, whatever it was called). I suppose we > should be using note sections really. Wouldn't that be ELF specific, as well as requiring the linker to merge hint strings? I'm a little unclear on just what capabilities the current linker has to merge section contents so that "hint strings" put into a note section wouldn't be duplicated in the final linked output, one for each compilation unit. How about just creating common symbols, which will be merged. That takes up less space than a section in the executable file, but does contribute something to the size of of the loaded uninitialized segment. I.E. if I add the following to mips_file_start(): { char buf[32]; sprintf (buf, "__%s", abi_string); mips_declare_common_object (asm_out_file, buf, "\n\t.comm\t", 4, 0, true); } cc1 then generates: .comm __abiO64,4,0 in each output. The linker should then merge all these into a single symbol in the output, which gdb could easily search for. -Fred