public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
To: Ben Elliston <bje@au1.ibm.com>
Cc: binutils@sources.redhat.com
Subject: Re: bfd cleanups
Date: Mon, 21 Feb 2005 17:45:00 -0000	[thread overview]
Message-ID: <20050221135607.GU1757@rembrandt.csv.ica.uni-stuttgart.de> (raw)
In-Reply-To: <20050131230750.GB4457@namadgi>

[-- Attachment #1: Type: text/plain, Size: 5269 bytes --]

Ben Elliston wrote:
> > > @@ -4617,10 +4582,6 @@ _bfd_mips_elf_fake_sections (bfd *abfd, 
> > >      {
> > >        if (SGI_COMPAT (abfd))
> > >  	hdr->sh_entsize = 0;
> > > -#if 0
> > > -      /* This isn't how the IRIX6 linker behaves.  */
> > > -      hdr->sh_info = SIZEOF_MIPS_DYNSYM_SECNAMES;
> > > -#endif
> > 
> > This should be retained (and probably changed for !IRIX ?).
> 
> I've retained all of the #if 0 code in elfxx-mips.c.  I'll come back
> and get it in a later sweep :-) Thiemo, please consider removing what
> you believe can be removed.

I applied the appended patch.


Thiemo


2005-02-21  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>

	* elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
	mips_elf_create_dynamic_relocation,
	_bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
	Remove #if 0'd code.


Index: bfd/elfxx-mips.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-mips.c,v
retrieving revision 1.122
diff -u -p -r1.122 elfxx-mips.c
--- bfd/elfxx-mips.c	20 Feb 2005 14:59:07 -0000	1.122
+++ bfd/elfxx-mips.c	21 Feb 2005 13:54:05 -0000
@@ -745,9 +745,6 @@ ecoff_swap_rpdr_out (bfd *abfd, const RP
   H_PUT_16 (abfd, in->pcreg, ex->p_pcreg);
 
   H_PUT_32 (abfd, in->irpss, ex->p_irpss);
-#if 0 /* FIXME */
-  H_PUT_S32 (abfd, in->exception_info, ex->p_exception_info);
-#endif
 }
 
 /* Create a runtime procedure table from the .mdebug section.  */
@@ -1691,9 +1688,6 @@ mips_elf_output_extsym (struct mips_elf_
 	      else
 		h->esym.asym.value = 0;
 	    }
-#if 0 /* FIXME?  */
-	  h->esym.ifd = 0;
-#endif
 	}
     }
 
@@ -3811,30 +3805,6 @@ mips_elf_create_dynamic_relocation (bfd 
   outrel[2].r_offset =
     _bfd_elf_section_offset (output_bfd, info, input_section, rel[2].r_offset);
 
-#if 0
-  /* We begin by assuming that the offset for the dynamic relocation
-     is the same as for the original relocation.  We'll adjust this
-     later to reflect the correct output offsets.  */
-  if (input_section->sec_info_type != ELF_INFO_TYPE_STABS)
-    {
-      outrel[1].r_offset = rel[1].r_offset;
-      outrel[2].r_offset = rel[2].r_offset;
-    }
-  else
-    {
-      /* Except that in a stab section things are more complex.
-	 Because we compress stab information, the offset given in the
-	 relocation may not be the one we want; we must let the stabs
-	 machinery tell us the offset.  */
-      outrel[1].r_offset = outrel[0].r_offset;
-      outrel[2].r_offset = outrel[0].r_offset;
-      /* If we didn't need the relocation at all, this value will be
-	 -1.  */
-      if (outrel[0].r_offset == MINUS_ONE)
-	skip = TRUE;
-    }
-#endif
-
   if (outrel[0].r_offset == MINUS_ONE)
     /* The relocation field has been deleted.  */
     return TRUE;
@@ -6147,22 +6117,6 @@ _bfd_mips_elf_size_dynamic_sections (bfd
       if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_FLAGS, 0))
 	return FALSE;
 
-#if 0
-      /* Time stamps in executable files are a bad idea.  */
-      if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_TIME_STAMP, 0))
-	return FALSE;
-#endif
-
-#if 0 /* FIXME  */
-      if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_ICHECKSUM, 0))
-	return FALSE;
-#endif
-
-#if 0 /* FIXME  */
-      if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_IVERSION, 0))
-	return FALSE;
-#endif
-
       if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_BASE_ADDRESS, 0))
 	return FALSE;
 
@@ -8237,47 +8191,6 @@ _bfd_mips_elf_final_link (bfd *abfd, str
 		    <= 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
-
   /* Get a value for the GP register.  */
   if (elf_gp (abfd) == 0)
     {

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 240 bytes --]

  reply	other threads:[~2005-02-21 13:56 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
2005-01-31 16:38     ` Thiemo Seufer
2005-01-31 23:06   ` Ben Elliston
2005-02-21 17:45     ` Thiemo Seufer [this message]
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=20050221135607.GU1757@rembrandt.csv.ica.uni-stuttgart.de \
    --to=ica2_ts@csv.ica.uni-stuttgart.de \
    --cc=binutils@sources.redhat.com \
    --cc=bje@au1.ibm.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).