public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Sandiford <rsandifo@redhat.com>
To: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Cc: Ben Elliston <bje@au1.ibm.com>, binutils@sources.redhat.com
Subject: Re: bfd cleanups
Date: Mon, 31 Jan 2005 16:11:00 -0000	[thread overview]
Message-ID: <wvnoef5oa5b.fsf@talisman.cambridge.redhat.com> (raw)
In-Reply-To: <20050131151244.GG15265@rembrandt.csv.ica.uni-stuttgart.de> (Thiemo Seufer's message of "Mon, 31 Jan 2005 16:12:44 +0100")

Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de> writes:
>> @@ -8187,47 +8092,6 @@ _bfd_mips_elf_final_link (bfd *abfd, str
>>  		     - g->global_gotsym->dynindx)
>>  		    <= g->global_gotno);
>>      }
>> -
>> -#if 0
>> -  /* We want to set the GP value for ld -r.  */
>> -  /* On IRIX5, we omit the .options section.  On IRIX6, however, we
>> -     include it, even though we don't process it quite right.  (Some
>> -     entries are supposed to be merged.)  Empirically, we seem to be
>> -     better off including it then not.  */
>> -  if (IRIX_COMPAT (abfd) == ict_irix5 || IRIX_COMPAT (abfd) == ict_none)
>> -    for (secpp = &abfd->sections; *secpp != NULL; secpp = &(*secpp)->next)
>> -      {
>> -	if (strcmp ((*secpp)->name, MIPS_ELF_OPTIONS_SECTION_NAME (abfd)) == 0)
>> -	  {
>> -	    for (p = (*secpp)->link_order_head; p != NULL; p = p->next)
>> -	      if (p->type == bfd_indirect_link_order)
>> -		p->u.indirect.section->flags &= ~SEC_HAS_CONTENTS;
>> -	    (*secpp)->link_order_head = NULL;
>> -	    bfd_section_list_remove (abfd, secpp);
>> -	    --abfd->section_count;
>> -
>> -	    break;
>> -	  }
>> -      }
>> -
>> -  /* We include .MIPS.options, even though we don't process it quite right.
>> -     (Some entries are supposed to be merged.)  At IRIX6 empirically we seem
>> -     to be better off including it than not.  */
>> -  for (secpp = &abfd->sections; *secpp != NULL; secpp = &(*secpp)->next)
>> -    {
>> -      if (strcmp ((*secpp)->name, ".MIPS.options") == 0)
>> -	{
>> -	  for (p = (*secpp)->link_order_head; p != NULL; p = p->next)
>> -	    if (p->type == bfd_indirect_link_order)
>> -	      p->u.indirect.section->flags &=~ SEC_HAS_CONTENTS;
>> -	  (*secpp)->link_order_head = NULL;
>> -	  bfd_section_list_remove (abfd, secpp);
>> -	  --abfd->section_count;
>> -
>> -	  break;
>> -	}
>> -    }
>> -#endif
>
> Richard, is this code obsolete for IRIX?

Well, PT_MIPS_REGINFO is supposed to be mandatory in 32-bit objects
and DT_MIPS_OPTIONS is mandatory in NewABI objects, so I can see why
the status quo makes sense for IRIX.  I certainly don't know of any
reason why we'd want to re-enable the code.

The comment for the first hunk claims that we don't merge .reginfo
correctly, but I think we try to do that in _bfd_mips_elf_final_link,
so maybe it's simply out of date.  I think that bit can probably go.

On the other hand, I suppose the second hunk is one of those cases where
the #if 0'd code is acting as commentary.  "We don't merge .MIPS.options
sections correctly, but it doesn't seem to matter, and we've decided to
keep the section anyway."  (Note that the comment is saying what we
do now, not what would happen if we re-enable the code.)  No opinion
either way on whether it's worth keeping.

Richard

  reply	other threads:[~2005-01-31 16:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-31  5:28 Ben Elliston
2005-01-31  7:16 ` Eric Botcazou
2005-01-31 22:58   ` Ben Elliston
2005-02-01  7:12     ` Eric Botcazou
2005-01-31 10:59 ` Nick Clifton
2005-01-31 15:14 ` Thiemo Seufer
2005-01-31 16:11   ` Richard Sandiford [this message]
2005-01-31 16:38     ` Thiemo Seufer
2005-01-31 23:06   ` Ben Elliston
2005-02-21 17:45     ` Thiemo Seufer
2005-01-31 20:29 ` Hans-Peter Nilsson
2005-01-31 23:09   ` Ben Elliston
2005-02-01  3:29     ` Hans-Peter Nilsson

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=wvnoef5oa5b.fsf@talisman.cambridge.redhat.com \
    --to=rsandifo@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=bje@au1.ibm.com \
    --cc=ica2_ts@csv.ica.uni-stuttgart.de \
    /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).