This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] MIPS/BFD: For n64 hold the number of internal relocs in `->reloc_count'
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 :)
Author: Jose E. Marchesi <email@example.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 <firstname.lastname@example.org>
* objcopy.c (merge_gnu_build_notes): Remove workaround that
prevented deleting relocations in duplicated notes in mips64 and
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 59e3bb3..60a199a 100644
@@ -1,3 +1,9 @@
+2017-05-19 Jose E. Marchesi <email@example.com>
+ * objcopy.c (merge_gnu_build_notes): Remove workaround that
+ prevented deleting relocations in duplicated notes in mips64 and
2017-05-19 Maciej W. Rozycki <firstname.lastname@example.org>
* testsuite/binutils-all/mips/mips-note-2.d: New test.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index ccb5e12..42c7775 100644
@@ -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;