public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* relocations in gas
@ 2005-01-18 15:48 Jean-Philippe Bernardy
  2005-01-19  5:25 ` Alan Modra
  0 siblings, 1 reply; 5+ messages in thread
From: Jean-Philippe Bernardy @ 2005-01-18 15:48 UTC (permalink / raw)
  To: binutils

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-01-21 22:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-18 15:48 relocations in gas Jean-Philippe Bernardy
2005-01-19  5:25 ` Alan Modra
2005-01-19 13:28   ` Jean-Philippe Bernardy
2005-01-21 13:28   ` Jean-Philippe Bernardy
2005-01-21 22:48     ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).