From: Alexandre Oliva <aoliva@redhat.com>
To: DJ Delorie <dj@redhat.com>
Cc: binutils@sources.redhat.com
Subject: Re: mn10300: relaxing vs section merging
Date: Tue, 11 May 2004 22:36:00 -0000 [thread overview]
Message-ID: <or3c66k2wg.fsf@free.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <200405062032.i46KWb8g023860@greed.delorie.com>
On May 6, 2004, DJ Delorie <dj@redhat.com> wrote:
>> I don't recall the exact details, but what I recall had to do with
>> losing information that was essential for (some definition of) correct
>> relaxation.
>> I do remember having run into this one problem years ago. I probably
>> thought the same anchoring issue could very well show up in other
>> relocation types, and just disabled adjusting for them all. Perhaps
>> it's safe to enable adjusting, at least as long as the addend is zero.
>> > You have to use section-relative relocs with section merging
>> Why?
> Because _bfd_elf_rela_local_sym() only adjusts STT_SECTION symbols.
> If you have other types of symbols, it doesn't seem to adjust the
> values properly.
Hmm... Maybe it should be improved/fixed, then? I suppose whenever
we get called with a symbol, we should figure out in which section it
is, find the relocation for the section, and then apply the symbol
offset into the section again.
>> Anyhow... I don't see how this could actually work in the general
>> case, since mn10300_fix_adjustable() actually refuses to adjust
>> relocations that reference symbols in code sections.
> The case that's failing is thusly, where the symbol referenced is in
> the merged rodata section and gets moved too far away through merging:
> .text
> mov .L1,d1
> .section .rodata.str1.1,"aMS",@progbits,1
> .L1:
> .string "\n"
This case could definitely be turned into a section symbol, even
though it's relaxable.
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}
next prev parent reply other threads:[~2004-05-11 22:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-05 18:18 DJ Delorie
2004-05-06 7:14 ` Alexandre Oliva
2004-05-07 1:19 ` DJ Delorie
2004-05-11 22:36 ` Alexandre Oliva [this message]
2004-05-12 1:35 ` Alan Modra
2004-05-25 23:14 ` DJ Delorie
2004-05-25 23:31 ` Alan Modra
2004-05-25 23:43 ` DJ Delorie
2004-05-26 0:02 ` Alan Modra
2004-05-26 0:18 ` DJ Delorie
2004-05-26 1:09 ` Alan Modra
2004-05-28 2:15 ` DJ Delorie
2004-05-28 2:36 ` Alexandre Oliva
2004-05-28 4:11 ` Alexandre Oliva
2004-05-28 4:17 ` DJ Delorie
2004-05-28 4:30 ` Alexandre Oliva
2004-05-28 21:49 ` DJ Delorie
2004-05-28 4:55 ` Alexandre Oliva
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=or3c66k2wg.fsf@free.redhat.lsd.ic.unicamp.br \
--to=aoliva@redhat.com \
--cc=binutils@sources.redhat.com \
--cc=dj@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).