This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Reloc question
- To: <binutils at sources dot redhat dot com>
- Subject: Reloc question
- From: Richard Sandiford <rsandifo at cygnus dot com>
- Date: Thu, 25 Jan 2001 09:38:12 +0000 (GMT)
I've a question about relocs. This is following up on a recent thread on
the cgen list which quickly become off-topic. Sorry if it's an FAQ.
Is it better to have a reloc refer to the operand that needs fixing up, or
to the instruction that contains it? I'd expected the former, based on
ports like the i386 and m68hc11. But it seemed to be generally accepted
on the cgen list that this was not a good thing in general. If, for
example, you have a 2-word instruction with an absolute address in the
second word, you shouldn't use a standard 32-bit reloc on that operand,
but instead have a reloc such as BFD_RELOC_2ND_32_BITS_OF_64_BIT_VALUE, or
similar.
BTW, the first relevant message was:
http://sources.redhat.com/ml/cgen/2001-q1/msg00076.html
Richard