This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding a new object format to BFD


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]