This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
mulitple relocation at same offset??
- From: "K. Ahmed Feroz" <feroz at acmet dot com>
- To: <binutils at sources dot redhat dot com>
- Date: Mon, 24 May 2004 19:34:24 +0530
- Subject: mulitple relocation at same offset??
Hi all,
Please suggest me the solution for the following problem,
How can I support multiple relocation using ELF32_REL type relocations?
For example
Consider the following instruction
xori r3, r4, lo(hi(symbol)) ---------------(1)
First relocation record will be of type R_MIPS_HI16 with symbol table
index of "symbol". When the linker will apply this relocation, the
result will be an integer value which will be updated at the offset of
relocation.
Thus, for the second relocation record, which is of type R_MIPS_LO16, we
should not specify symbol table index of "symbol". So symbol table index
of NULL entry is updated.
GNU linker ported for our processor is giving the following error for
this relocation record "Relocation is truncated to fit R_MIPS_L016"
Reason:
I think the linker didn't find the operand for the 'lo' operator.
If we provide symbol table index of "symbol" for the second relocation
record, Then expression ---(1) will be treated as
"lo(symbol)+hi(symbol)". This will not give the correct result.
So how to solve the above problem ?..
Should I have to introduce my own relocation type and patch up to be
done in the linker code?
Regards
K.Feroz