From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4088 invoked by alias); 4 May 2003 19:41:27 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3952 invoked from network); 4 May 2003 19:40:48 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 4 May 2003 19:40:48 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 1B29C2B2F; Sun, 4 May 2003 15:40:11 -0400 (EDT) Message-ID: <3EB56C9A.6070207@redhat.com> Date: Sun, 04 May 2003 19:41:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jim Blandy Cc: David Taylor , gdb@sources.redhat.com Subject: Re: macros, debug information, and parse_macro_definition References: <200304221640.h3MGelj05733@mailhub.lss.emc.com> <200304241512.h3OFCG518027@mailhub.lss.emc.com> <3EAE927E.4030005@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00044.txt.bz2 > Actually, I think that David's proposed representation will compress > really well, with no new linker work. The linker's current behavior > will do everything that's needed. > > Each entry in the .stab section is a fixed-size record; the textual > portion of the stab is represented as an offset into the .stabstr > section, which contains null-terminated strings. The .stabstr section > is a SHT_STRTAB type section, which means that the linker will > automatically factor out duplicates. So if two .stab entries have the > same text, they'll end up pointing to the same bytes in .stabstr in > the final executable. > > In David's proposed representation, #including a file into many > different .o files will produce stabs entries with identical strings, > so they'll all get factored out nicely. > > All this is completely independent of the BINCL/EINCL -> EXCL > compression the linker also does for STABS, to factor out duplicated > entries from the .stab section itself. So the stabs mechanism might compress down to something useable. Ah, the irony :-) Andrew