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: Problems assembling TI-style code with ARM-coff assembler


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:

  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		"); 

Cheers
        Nick


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