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]

[PATCH] Support for TI COFF format ARM object files


I've written a patch to add support to binutils for TI ARM COFF object files
(as used by the TI toolchain including the Code Composer debugger for the
Innovator platform). TI have a minor proprietary variant on COFF which is
already supported by binutils but only for some DSP chip.

The patch includes a new file bfd/coff-tiarm.c but does not include makefile
changes to get this file compiled, because I couldn't work out how to
generate a patch that only had the necessary changes and not a load of
autogenerated dependency noise. This patch has been lightly tested in that
it seems to produce a working objdump and objcopy. I haven't tried to test
anything else because that's all we needed. In particular, I suspect that
the handling of relocations is buggy.

TI COFF format includes an extension supporting section names of more than 8
characters. This is similar to the existing binutils supported long section
names extension used by the PE object format, except that the string table
offset is stored in the section header slightly differently. I just added
support for the TI extension where the PE extension has been coded, although
I note that this entailed editing a file which claims to include no target
specific code. I couldn't work out how to make this code apply only to the
TI COFF backends without adding a new field to every backend structure, so
any COFF backend that claims to support long section names will try to read
both PE and TI style long section names. I don't think this will cause any
problems in practice.

We don't have any further resources to spend on debugging or enhancing this
patch, so I really just wanted to get it out so that Google can find it and
other people who might need this can find it. You're welcome to include it
into future binutils releases or not, as you choose. (I can entirely
understand it if you think it's too half-baked to include and don't want
to clean it up yourselves.) If you need a signed copyright disclaimer
from the company this will be easier to obtain now while it's fresh in
their minds than it might be six months down the line, though.

The patch is against binutils-2.12.90.0.1 with debian patches applied
(yeah, I know that's not terribly convenient; sorry again.)

Since the patch is nearly 500 lines I haven't included it in this email,
but you can find it at:
http://www.chiark.greenend.org.uk/~pmaydell/misc/binutils.patch.txt

Peter Maydell


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