This is the mail archive of the binutils@sources.redhat.com 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 elf support to an coff target


On Sat, Jun 14, 2003 at 12:06:56AM +0200, Svein E. Seldal wrote:
> Hi,
> 
> The tic4x target supports only coff as of this day. But I'm wishing for 
> elf support (to get weak symbols and such).
> 
> Can I have both coff and elf support at the same time in the compiled 
> binutils binaries? Or do I have to specify them as two entirely 
> different targets? What do I have to do to get elf support in this target?

I suspect linking COFF objects with ELF, producing an ELF output would be
simpler than producing COFF output.

You can have the linker have support for multiple object formats.  Several of
the ports do that (IIRC, some of the x86 targets supported a.out, COFF, and ELF
targets in the past, and some of the powerpc targets include support for both
ECOFF and ELF).  You do have to have support for all of the relocations in both
of the input formats in your output format, and there may be some issues with
the private data pointer in each object module.  I don't recall if gas can
switch formats based on a switch, but you can probably make the assumption that
new code will use ELF, and existing libraries and such will use COFF.

Config.bfd (in targ_selvecs) tells bfd what other targets are needed for a
particular target.

-- 
Michael Meissner
email: gnu@the-meissners.org
http://www.the-meissners.org


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