From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6726 invoked by alias); 10 Apr 2006 14:47:37 -0000 Received: (qmail 6717 invoked by uid 22791); 10 Apr 2006 14:47:35 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Apr 2006 14:47:33 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k3AElVnT011044; Mon, 10 Apr 2006 10:47:31 -0400 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.11.6) with ESMTP id k3AElPcE017537; Mon, 10 Apr 2006 10:47:25 -0400 Received: from [10.32.68.1] (vpn-68-1.surrey.redhat.com [10.32.68.1]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id k3AElKOk010671; Mon, 10 Apr 2006 15:47:21 +0100 Message-ID: <443A6F0C.8060506@redhat.com> Date: Mon, 10 Apr 2006 14:55:00 -0000 From: Nick Clifton User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: mohamed aslan CC: binutils@sourceware.org Subject: Re: Adding a new object format to BFD References: <20060410004913.7790.qmail@web30212.mail.mud.yahoo.com> In-Reply-To: <20060410004913.7790.qmail@web30212.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2006-04/txt/msg00142.txt.bz2 Hi Mohamed Aslan, > I'ld like to know the steps i should follow in order > to add a new object format to libbfd. Essentially what you need to do is to duplicate the file-format specific code in the include, gas and bfd directories. The easiest way to do this is to take an already supported file format as an example and copy what is done for it. > where the object format is not aout/elf/coff, its new > simple object format, used in the OS i'm writing as an > relocatable object format for the modules. So for example if you look at the support for the a.out file format you will find at least these files and directories: include/aout gas/config/obj-aout.[ch] bfd/aout* Try using these as a starting point for your new file format. You will also need to modify the various configure and Makefile files in the binutils directories in order to ensure that your new files are included when you build binutils. Cheers Nick