From: Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>
To: binutils@sources.redhat.com
Subject: relocations in gas
Date: Tue, 18 Jan 2005 15:48:00 -0000 [thread overview]
Message-ID: <953e0d25050118074857ba5d60@mail.gmail.com> (raw)
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.
next reply other threads:[~2005-01-18 15:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-18 15:48 Jean-Philippe Bernardy [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=953e0d25050118074857ba5d60@mail.gmail.com \
--to=jeanphilippe.bernardy@gmail.com \
--cc=binutils@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).