This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problems assembling TI-style code with ARM-coff assembler
Nick Clifton wrote:
> Hi Eckhard,
>
> > I have to compile a *.c file that is written to be compiled by a TI
> > compiler for TMS470 ( ARM7-core) and contains the followling lines:
> >
> > asm(" .def _entrytable ");
> > asm(" .def $entrytable ");
> > asm("_entrytable: ");
> > asm("$entrytable: ");
> >
> > This results in
> >
> > /tmp/ccm7ONcX.s: Assembler messages:
> > /tmp/ccm7ONcX.s:110: Warning: rest of line ignored; first ignored
> > character is `"'
> > /tmp/ccm7ONcX.s:112: Warning: .def pseudo-op used inside of .def/.endef:
> > ignored.
> > /tmp/ccm7ONcX.s:112: Warning: rest of line ignored; first ignored
> > character is `$'
>
> Presumably these are TI assembler commands to define global symbols ?
> In which case their equivalent gcc entries would be:
Unfortunately I don't have any docs about the TI commands at the moment - but
it seems to work.
>
> asm(" .global _entrytable ");
> asm(" .global $entrytable ");
> asm("_entrytable: ");
> asm("$entrytable: ");
>
> > asm(" B #-8 ");
> >
> > produces the error
> >
> > /tmp/ccYZkjox.s:117: Error: bad expression -- `b #-8'
>
> You probably want to omit the hash, like this:
>
> asm(" B -8 ");
OK thank you that's working as well.
But (as somehow to be expected ) there are some more things that are not
compatible:
asm ("DUMMY: ");
asm (" .ref _entrytable ");
asm (" .field _entrytable,32 ");
.ref and .field are also not known pseudo-ops.
and in the following
.sect ".intvecs"
B _c_int00
B _entrytable+0x08
B _entrytable+0x0C
B _entrytable+0x10
B _entrytable+0x14
B _entrytable+0x18
B _entrytable+0x1C
B _entrytable+0x20
B _entrytable+0x24
.ref _TswKwp_IdentTab_PST
causes
/tmp/cci3npji.s:75: Warning: rest of line ignored; first ignored character is
Where can I look up the valid (gcc/ gas ) commands for arm-7-coff?
If there occure more of these things I would like to help writing some kind of
script to translate from TI to ARM.
Thanks again
Eckhard