From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32716 invoked by alias); 12 Jun 2003 14:46:39 -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 32693 invoked from network); 12 Jun 2003 14:46:37 -0000 Received: from unknown (HELO hub.ott.qnx.com) (209.226.137.76) by sources.redhat.com with SMTP; 12 Jun 2003 14:46:37 -0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.0.2.158]) by hub.ott.qnx.com (8.9.3p2/8.9.3) with ESMTP id KAA01538; Thu, 12 Jun 2003 10:40:24 -0400 Received: from catdog ([10.4.2.2]) by smtp.ott.qnx.com (8.8.8/8.6.12) with SMTP id KAA07107; Thu, 12 Jun 2003 10:46:33 -0400 Message-ID: <014101c330f1$748af060$0202040a@catdog> From: "Kris Warkentin" To: Cc: , "Gdb@Sources.Redhat.Com" References: <200306121427.h5CERJR20619@pc960.cambridge.arm.com> Subject: Re: Elf OS ABI Number Date: Thu, 12 Jun 2003 14:46:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-SW-Source: 2003-06/txt/msg00204.txt.bz2 > > Actually, we do have a few things that are different - QNX specific > > relocations, different MIPS ABI, etc. It seems like having the ABI number > > can do no harm but can certainly be useful. > > As I said before, new relocations is a valid reason for an OS_ABI field > change. However, an ABI change (calling standard) is not -- it doesn't > change the meaning of the ELF container, which is what the field is about. > The harm is that a linker is supposed to reject an OS_ABI field setting > it doesn't understand. Yes, I just learned that yesterday. I'm beginning to lean back towards the .note section. I'm beginning to win hearts and minds on this end as well. > Is there a good reason why you've invented your own relocs? If the > processor vendor (who generally own the reloc space allocation for their > processor) where to allocate a reloc that conflicts with your usage at a > later date you might have a major problem on your hands. We do some weird stuff for execute in place and various kernel stuff. I don't understand the details particularily well but we have to use our own linker on certain startup code and such. Probably doesn't affect much else. > > The problem with things like > > .note sections for identifying binaries is that a stripped binary can no > > longer be identified. > > No, .note sections are not symbols, so are not removed by strip. The only > way to remove a .note section is to use objcopy and tell it not to copy > that section. Well, I should have been more clear on that. When we put binaries into an image, they are REALLY stripped - no sections at all. They are also pre-relocated so that they can be run directly off of flash or other memory type media. Ultimately, you can't really debug these anyway (bfd won't even recognize them properly) so it doesn't really matter that much. If you have a version with debug info that gdb can load, you can debug them properly anyway though so it's only a minor quibble. cheers, Kris