This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

relocations in gas


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]