From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21507 invoked by alias); 19 Aug 2002 23:15:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21495 invoked from network); 19 Aug 2002 23:15:22 -0000 Received: from unknown (HELO dr-evil.shagadelic.org) (208.176.2.174) by sources.redhat.com with SMTP; 19 Aug 2002 23:15:22 -0000 Received: by dr-evil.shagadelic.org (Postfix, from userid 7518) id 853919869; Mon, 19 Aug 2002 16:15:21 -0700 (PDT) Date: Mon, 19 Aug 2002 16:15:00 -0000 From: Jason R Thorpe To: Andrew Cagney Cc: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Don't complain about unknown OSABI Message-ID: <20020819161521.I2214@dr-evil.shagadelic.org> Mail-Followup-To: Jason R Thorpe , Andrew Cagney , Daniel Jacobowitz , gdb-patches@sources.redhat.com References: <3D5FC00D.50001@ges.redhat.com> <20020818154927.GA20358@nevyn.them.org> <3D5FCE6A.9080308@ges.redhat.com> <20020819161543.GA10137@nevyn.them.org> <3D61792B.1020708@ges.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3D61792B.1020708@ges.redhat.com>; from ac131313@ges.redhat.com on Mon, Aug 19, 2002 at 07:03:07PM -0400 Organization: Wasabi Systems, Inc. X-SW-Source: 2002-08/txt/msg00566.txt.bz2 On Mon, Aug 19, 2002 at 07:03:07PM -0400, Andrew Cagney wrote: > Something in binutils knows what the basic OS is. The linker often > knows to brand the executable a certain way (although increasingly it is > the compiler that is telling the linker everything). What executable, > for instance, does: > > as -o s.o /dev/null > ld s.o > > create? binutils doesn't really know this, per se. Some BFD back-ends plop an ELF OSABI value into that part of the ELF ID. But e.g. alpha-netbsd does not, because there is no OS-specific anything in the BFD back-end. (I would say the majority of BFD back-ends fall into this category.) In the above case, GDB would not know the OS ABI for a NetBSD binary, because the NetBSD ABI tag, which is provided by crtbegin.o, is not linked into the executable. > Is there an equivalent for the OS/ABI? If we can pick that default up > from binutils then we also get that for free. On the other hand if we > start wiring this stuff into configure.tgt (duplicating ld/gcc) we take > on an additional maintenance task. In BFD, it depends on the back-end. e.g. if you want a back-end that sets the ELF OS ABI field to "FreeBSD", the back-end has to be a -fbsd back-end (are there any in the tree like this now?). Anyway, I don't think we can rely on BFD to provide us with OS ABI information (because BFD doesn't actually *know* about OS ABI things in the same sense that GDB does). -- -- Jason R. Thorpe