COFF relocation examples with PUSH, OPERAND and POP functionality

Kerry Keal kerry@industrialmusic.com
Sat Mar 29 00:12:00 GMT 2003


Hi,
  I'm working on porting the TI C55x to binutils (
http://c55x-binutils.sourceforge.net/ ). I was wondering if anyone could
point me to some examples that have COFF linker commands with PUSH, POP,
and OPERAND type relocation instructions. For example: the instruction

.global _symbol
mov #(_symbol & 0xFFFF), AC0

would have 4 relocations for 1 address in the relocation section:
1)push the value of _symbol on the stack
2)push the constant 0xFFFF on the stack
3)replace 2 elements on the stack with the AND operation of those 2
elements
4) pop the value of the stack for the relocation

I'm investigating using the "special_function" in the HOWTO declarations
to implement this in bfd/coff-tic55x.c. For PUSH and OPERAND type I was
returning bfd_reloc_ok. For the pop instruction I tried to set the value
of the symbol and return bfd_reloc_cont but that crashes. So I was
hoping someone could recommend some good example code.

Thanks in advance for any help.

Regards,
Kerry

-- 
Kerry Keal <kerry@industrialmusic.com>



More information about the Binutils mailing list