This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
relocations in gas
- From: Jean-Philippe Bernardy <jeanphilippe dot bernardy at gmail dot com>
- To: binutils at sources dot redhat dot com
- Date: Tue, 18 Jan 2005 16:48:39 +0100
- Subject: relocations in gas
- Reply-to: Jean-Philippe Bernardy <jeanphilippe dot bernardy at gmail dot com>
Greetings,
I'm trying to bring an old port of binutils to the current version.
The port is for the calmrisc16 architecture. It uses cgen and
--version says "2.10-calmrisc16-010518".
All seems well except that I'm currently facing a problem with
relocation in gas: when a global symbol is referenced inside its
defining module, the relocation table contains a wrong entry. From an
external point of view it seems that the relocation is done twice.
This problem didn't manifest itself with old binutils.
Maybe this rings a bell? Any help would be greatly appreciated.
Details follow...
Assembling:
.text
.globl fct2
fct1:
jmp fct2
jmp fct3
jmp fct4
fct2:
nop
fct3:
nop
objdump -r says:
RELOCATION RECORDS FOR [.text]:
OFFSET TYPE VALUE
00000000 R_CALMRISC16_IMM22 fct2+0x0000000c
00000004 R_CALMRISC16_IMM22 .text+0x0000000e
00000008 R_CALMRISC16_IMM22 fct4
whereas the correct table would be
00000000 R_CALMRISC16_IMM22 fct2
00000004 R_CALMRISC16_IMM22 .text+0x0000000e
00000008 R_CALMRISC16_IMM22 fct4
Note that the problem occurs only for the fct2 symbol (global).
Thanks in advance,
JP.