From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45564 invoked by alias); 7 May 2015 21:21:33 -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 45529 invoked by uid 89); 7 May 2015 21:21:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-ie0-f201.google.com Received: from mail-ie0-f201.google.com (HELO mail-ie0-f201.google.com) (209.85.223.201) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 07 May 2015 21:21:29 +0000 Received: by ierx19 with SMTP id x19so3963035ier.0 for ; Thu, 07 May 2015 14:21:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:message-id:date:subject:from:to :content-type; bh=pxlvBxGZn+Fuz/KhEp+lgSwmDAFHNR9gesRjDh7bSPw=; b=R+0A+MoOOV1W2Zb29q51++Qt2tcNJFLtfH+V071uqLVAY9v5r8IJwedj02WASuomYI OONEe1D3qIcu1dofQhRGVs8YwRX4nUZXKIdlPzMQ/La0A+Zxwv51TPoL8jG6y8Mzdew2 iyk9aGYQ3OSqS8CibmW75Yck1jSOrRr0PfpC0mpTfMUO1HDDlsKeszOrIaHGLRIbpgrD nLva4vpDbLlA6WHVzPvSyXXG7KFW6+XzwG7jbJmSzUveO8TS1JlRQnVLH46ugjI2kOFl uWTzW2PvOhrBsh2idgjTD3i2Lrh4CKIKGdtIPid9Rjw/4jgtNuMLF8JrnBb+7HISUKia LRbA== X-Gm-Message-State: ALoCoQnGPs3VPg+BHmceXioPAfJHRtyWgt2nLsXyvOipCuJo9SfyU1JgAQmsduwNMKL0uWOtciAGPKIDhS9WYbTzqj5Fd9QerAeK9ww6HOvALfx6FKkXoiLU7H0lRz9QhquaHFybiUa7oJ3y6M7Mmkp4DRRYIDYTbwM+kGyU3hyhUjBL7YnUnyA= MIME-Version: 1.0 X-Received: by 10.42.83.84 with SMTP id g20mr923571icl.23.1431033686936; Thu, 07 May 2015 14:21:26 -0700 (PDT) Message-ID: <90e6ba6e87129285600515847ec6@google.com> Date: Thu, 07 May 2015 21:21:00 -0000 Subject: [RFC] When can we remove Sun-specific stabs support? (when will it be ok to delete partial_symtab.section_offsets?) From: Doug Evans To: gdb-patches@sourceware.org Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00169.txt.bz2 Hi. While working on improving some symbol table code I stumbled on partial_symtab.section_offsets and that led me to elfstab_offset_sections. AFAICT, the only reason partial_symtab.section_offsets exists is for Sun stabs. There are no regressions if I comment out elfstab_offset_sections on linux+stabs. Grep for Ddata.data in doc/stabs.texinfo for further background. elfread.c: /* When handling an ELF file that contains Sun STABS debug info, some of the debug info is relative to the particular chunk of the section that was generated in its individual .o file. E.g. offsets to static variables are relative to the start of the data segment *for that module before linking*. This information is painfully squirreled away in the ELF symbol table as local symbols with wierd names. Go get 'em when needed. */ dbxread.c: #ifdef HAVE_ELF /* If we're handling an ELF file, drag some section-relocation info for this source file out of the ELF symbol table, to compensate for Sun brain death. This replaces the section_offsets in this psymtab, if successful. */ elfstab_offset_sections (objfile, result); #endif N.B. I'm not suggesting remove stabs support, just this hack for Sun stabs. Deleting partial_symtab.section_offsets will simplify some code (for non-sun-stabs it's just a pointer to objfile->section_offsets). It'll also help the ObjfileSplitting project. https://sourceware.org/gdb/wiki/ObjfileSplitting