public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: jose.marchesi@oracle.com (Jose E. Marchesi)
To: "Maciej W. Rozycki" <macro@imgtec.com>
Cc: Alan Modra <amodra@gmail.com>, <binutils@sourceware.org>
Subject: Re: [PATCH] MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count'
Date: Mon, 22 May 2017 09:21:00 -0000	[thread overview]
Message-ID: <87shjzx365.fsf@oracle.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1705200036430.2590@tp.orcam.me.uk> (Maciej	W. Rozycki's message of "Sat, 20 May 2017 00:37:21 +0100")

    On Fri, 19 May 2017, Maciej W. Rozycki wrote:
    
    >  I am going to commit this change then, as soon as the `run_dump_test' 
    > update it depends on, and I have just posted, has been approved, which I 
    > expect to be a formality.  Any possible fallout can be handled if and as 
    > it actually happens; this clean-up is I think well worth it.
    
     I have now applied this change.
    
And I just checked the patch below to remove the objcopy workaround.

I think by now the two problems described in
https://sourceware.org/ml/binutils/2017-04/msg00264.html are fixed :)

commit b4f5b984e5e771e75cee43942e56455531a02e68
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date:   Fri May 19 23:45:29 2017 -0700

    binutils: remove sparc64/mips64 workaround in objcopy build notes merge code
    
    This patch removes a workaround recently installed in objcopy that
    avoided removing duplicated notes in targets for which the number of
    internal relocations may be bigger than the number of external
    relocations.  With the recent fixes in sparc64 and mips64, this
    workaround is no longer necessary.
    
    2017-05-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
    
    	* objcopy.c (merge_gnu_build_notes): Remove workaround that
    	prevented deleting relocations in duplicated notes in mips64 and
    	sparc.

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 59e3bb3..60a199a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2017-05-19  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* objcopy.c (merge_gnu_build_notes): Remove workaround that
+	prevented deleting relocations in duplicated notes in mips64 and
+	sparc.
+
 2017-05-19  Maciej W. Rozycki  <macro@imgtec.com>
 
 	* testsuite/binutils-all/mips/mips-note-2.d: New test.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index ccb5e12..42c7775 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -2137,13 +2137,6 @@ merge_gnu_build_notes (bfd * abfd, asection * sec, bfd_size_type size, bfd_byte
 	    relcount = 0;
 	}
 
-      /* A few targets (eg MIPS, SPARC) create multiple internal relocs to
-	 represent a single external reloc.  Unfortunately the current BFD
-	 API does not handle deleting relocs in such situations very well
-	 and so it is unsafe to proceed.  */
-      if ((unsigned long) relcount > sec->reloc_count)
-	goto done;
-
       /* Eliminate the duplicates.  */
       new = new_contents = xmalloc (size);
       for (pnote = pnotes, old = contents;

  reply	other threads:[~2017-05-20  9:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-05 12:10 [PATCH V2 0/3] Fix relocation deletion problems in SPARC and MIPS Jose E. Marchesi
2017-05-05 12:10 ` [PATCH V2 3/3] bfd: fix the deletion of relocs in mips64 Jose E. Marchesi
2017-05-17 15:29   ` Maciej W. Rozycki
2017-05-17 16:14     ` Jose E. Marchesi
2017-05-19 14:14       ` [PATCH] MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count' Maciej W. Rozycki
2017-05-19 15:01         ` Jose E. Marchesi
2017-05-19 15:47           ` Maciej W. Rozycki
2017-05-20  9:56         ` Maciej W. Rozycki
2017-05-22  9:21           ` Jose E. Marchesi [this message]
2017-05-22 17:51           ` Joseph Myers
2017-05-22 20:48             ` Maciej W. Rozycki
2017-05-05 12:10 ` [PATCH V2 2/3] bfd: fix the deletion of relocs in sparc64 Jose E. Marchesi
2017-05-10 16:51   ` Jose E. Marchesi
2017-05-05 12:10 ` [PATCH V2 1/3] bfd: new BFD target entry point _bfd_set_reloc Jose E. Marchesi
2017-05-07  2:53   ` Alan Modra
2017-05-10 16:49     ` Jose E. Marchesi

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=87shjzx365.fsf@oracle.com \
    --to=jose.marchesi@oracle.com \
    --cc=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=macro@imgtec.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).