This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
COFF relocation examples with PUSH, OPERAND and POP functionality
- From: Kerry Keal <kerry at industrialmusic dot com>
- To: binutils at sources dot redhat dot com
- Date: 28 Mar 2003 12:05:08 -0800
- Subject: COFF relocation examples with PUSH, OPERAND and POP functionality
- Organization:
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 at industrialmusic dot com>