summaryrefslogtreecommitdiff
path: root/sources/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'sources/binutils')
-rw-r--r--sources/binutils/2.15.91.0.2/500-branch-likely.patch10
-rw-r--r--sources/binutils/2.15.91.0.2/700-binutils-20040817-linkonce.patch118
-rw-r--r--sources/binutils/2.15.91.0.2/701-binutils-dup-sections.patch68
-rw-r--r--sources/binutils/2.15.91.0.2/702-binutils-skip-comments.patch101
4 files changed, 297 insertions, 0 deletions
diff --git a/sources/binutils/2.15.91.0.2/500-branch-likely.patch b/sources/binutils/2.15.91.0.2/500-branch-likely.patch
new file mode 100644
index 000000000..0bb1a4b4f
--- /dev/null
+++ b/sources/binutils/2.15.91.0.2/500-branch-likely.patch
@@ -0,0 +1,10 @@
+--- binutils-2.15.90.0.3/gas/config/tc-mips.c-dist 2004-08-19 12:56:20.000000000 -0500
++++ binutils-2.15.90.0.3/gas/config/tc-mips.c 2004-08-19 12:57:30.000000000 -0500
+@@ -2708,6 +2708,7 @@
+ prev_insn_reloc_type[1] = BFD_RELOC_UNUSED;
+ prev_insn_reloc_type[2] = BFD_RELOC_UNUSED;
+ prev_insn_extended = 0;
++ prev_insn_is_delay_slot = 1;
+ }
+ else
+ {
diff --git a/sources/binutils/2.15.91.0.2/700-binutils-20040817-linkonce.patch b/sources/binutils/2.15.91.0.2/700-binutils-20040817-linkonce.patch
new file mode 100644
index 000000000..97fa6eed6
--- /dev/null
+++ b/sources/binutils/2.15.91.0.2/700-binutils-20040817-linkonce.patch
@@ -0,0 +1,118 @@
+From http://sources.redhat.com/ml/binutils/2004-08/msg00190.html
+
+Date: Tue, 17 Aug 2004 12:04:29 +0200
+From: Jakub Jelinek <jakub at redhat dot com>
+To: binutils at sources dot redhat dot com
+Subject: [PATCH] Fix `defined in discarded section' errors when building ia64 gcc
+Message-ID: <20040817100429.GL30497@sunsite.ms.mff.cuni.cz>
+Reply-To: Jakub Jelinek <jakub at redhat dot com>
+References: <20040817090201.GK30497@sunsite.ms.mff.cuni.cz>
+In-Reply-To: <20040817090201 dot GK30497 at sunsite dot ms dot mff dot cuni dot cz>
+
+On Tue, Aug 17, 2004 at 11:02:01AM +0200, Jakub Jelinek wrote:
+> Current gcc 3.4.x (at least gcc-3_4-rhl-branch) doesn't build with CVS
+> binutils (nor 2.15.91.0.2).
+> The problem is that libstdc++.so linking fails with:
+> `.gnu.linkonce.t._ZNSdD2Ev' referenced in section `.gnu.linkonce.ia64unw._ZNSdD2Ev' of .libs/sstream-inst.o: defined in discarded section `.gnu.linkonce.t._ZNSdD2Ev' of .libs/sstream-inst.o
+> The problem is that both io-inst.s and sstream-inst.s have
+> .gnu.linkonce.t._ZNSdD2Ev definition, but because io-inst.cc
+> also instantiates some templates sstream-inst.cc doesn't instantiate,
+> the inliner can do a better job in io-inst.cc.
+> The result is that _ZNSdD2Ev in io-inst.cc is a leaf routine, while
+> it is not in sstream-inst.cc (in assembly,
+> _ZNSdD2Ev in io-inst.s starts with .prologue and no .save directives,
+> while _ZNSdD2Ev] in sstream-inst.s has .prologue 12, 35 and some
+> .save directives.
+> IA-64 ABI allows leaf routines to have no unwind section at all,
+> which means .gnu.linkonce.ia64unw._ZNSdD2Ev is not created in
+> io-inst.o at all and as .gnu.linkonce.t._ZNSdD2Ev comes first
+> and wins, .gnu.linkonce.ia64unw._ZNSdD2Ev in sstream.o suddenly
+> references a discarded section.
+>
+> Not sure what should be done here, but certainly the compiler
+> isn't at fault here, it is a binutils problem.
+> One fix could be to create empty .gnu.linkonce.ia64unw.* section
+> in assembler, another special case ia64 unwind sections in the linker.
+
+Here is a patch for the first possibility.
+It certainly makes libstdc++.so to link and even the unwind info looks
+good on brief skimming.
+
+2004-08-17 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-ia64.c (start_unwind_section): Add linkonce_empty
+ argument, don't do anything if current section is not
+ .gnu.linkonce.t.* and linkonce_empty is set.
+ (generate_unwind_image, dot_endp): Adjust callers, call
+ start_unwind_section (*, 1) if nothing will be put into the
+ section.
+
+--- binutils/gas/config/tc-ia64.c.jj 2004-07-30 11:42:24.000000000 +0200
++++ binutils/gas/config/tc-ia64.c 2004-08-17 13:45:04.288173205 +0200
+@@ -1,5 +1,6 @@
+ /* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
+- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
++ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
++ Free Software Foundation, Inc.
+ Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
+
+ This file is part of GAS, the GNU Assembler.
+@@ -3297,7 +3298,7 @@ static char *special_linkonce_name[] =
+ };
+
+ static void
+-start_unwind_section (const segT text_seg, int sec_index)
++start_unwind_section (const segT text_seg, int sec_index, int linkonce_empty)
+ {
+ /*
+ Use a slightly ugly scheme to derive the unwind section names from
+@@ -3359,6 +3360,8 @@ start_unwind_section (const segT text_se
+ prefix = special_linkonce_name [sec_index - SPECIAL_SECTION_UNWIND];
+ suffix += sizeof (".gnu.linkonce.t.") - 1;
+ }
++ else if (linkonce_empty)
++ return;
+
+ prefix_len = strlen (prefix);
+ suffix_len = strlen (suffix);
+@@ -3444,7 +3447,7 @@ generate_unwind_image (const segT text_s
+ expressionS exp;
+ bfd_reloc_code_real_type reloc;
+
+- start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO);
++ start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 0);
+
+ /* Make sure the section has 4 byte alignment for ILP32 and
+ 8 byte alignment for LP64. */
+@@ -3485,6 +3488,8 @@ generate_unwind_image (const segT text_s
+ unwind.personality_routine = 0;
+ }
+ }
++ else
++ start_unwind_section (text_seg, SPECIAL_SECTION_UNWIND_INFO, 1);
+
+ free_saved_prologue_counts ();
+ unwind.list = unwind.tail = unwind.current_entry = NULL;
+@@ -4164,7 +4169,7 @@ dot_endp (dummy)
+ subseg_set (md.last_text_seg, 0);
+ unwind.proc_end = expr_build_dot ();
+
+- start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND);
++ start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 0);
+
+ /* Make sure that section has 4 byte alignment for ILP32 and
+ 8 byte alignment for LP64. */
+@@ -4204,6 +4209,9 @@ dot_endp (dummy)
+ bytes_per_address);
+
+ }
++ else
++ start_unwind_section (saved_seg, SPECIAL_SECTION_UNWIND, 1);
++
+ subseg_set (saved_seg, saved_subseg);
+
+ /* Parse names of main and alternate entry points and set symbol sizes. */
+
+
+ Jakub
+
diff --git a/sources/binutils/2.15.91.0.2/701-binutils-dup-sections.patch b/sources/binutils/2.15.91.0.2/701-binutils-dup-sections.patch
new file mode 100644
index 000000000..4e4934d8c
--- /dev/null
+++ b/sources/binutils/2.15.91.0.2/701-binutils-dup-sections.patch
@@ -0,0 +1,68 @@
+See http://sources.redhat.com/ml/binutils/2004-08/msg00256.html
+
+Date: Fri, 20 Aug 2004 21:13:43 -0400
+From: Daniel Jacobowitz <drow at false dot org>
+To: binutils at sources dot redhat dot com
+Subject: Re: Handle SEC_LINK_DUPLICATES_SAME_CONTENTS for arm-linux
+Message-ID: <20040821011342.GA30319@nevyn.them.org>
+Mail-Followup-To: binutils at sources dot redhat dot com
+References: <20040818145518.GA9774@nevyn.them.org> <20040819055040.GA11820@lucon.org> <20040819080034.GE21716@bubble.modra.org> <20040820173240.GA17678@nevyn.them.org> <20040821003737.GB16016@bubble.modra.org>
+In-Reply-To: <20040821003737 dot GB16016 at bubble dot modra dot org>
+
+On Sat, Aug 21, 2004 at 10:07:38AM +0930, Alan Modra wrote:
+> On Fri, Aug 20, 2004 at 01:32:40PM -0400, Daniel Jacobowitz wrote:
+> > Thanks. How's this?
+>
+> As you might have guessed from my rather slack review of your previous
+> patch, I trust you enough to give the OK without proper review. But
+> since you asked... :)
+
+Checked in as so.
+
+--
+Daniel Jacobowitz
+
+[ rediffed against binutils-2.15.91.0.2, with some elbow grease ]
+
+2004-08-20 Daniel Jacobowitz <dan@debian.org>
+
+ * elflink.c (_bfd_elf_section_already_linked): Handle
+ SEC_LINK_DUPLICATES_SAME_CONTENTS.
+--- binutils-2.15.91.0.2/bfd/elflink.c.old 2004-07-27 21:36:08.000000000 -0700
++++ binutils-2.15.91.0.2/bfd/elflink.c 2004-08-26 06:38:07.000000000 -0700
+@@ -9359,6 +9359,35 @@
+ (_("%s: %s: warning: duplicate section `%s' has different size\n"),
+ bfd_archive_filename (abfd), name);
+ break;
++ case SEC_LINK_DUPLICATES_SAME_CONTENTS:
++ if (sec->size != l->sec->size)
++ (*_bfd_error_handler)
++ (_("%B: duplicate section `%A' has different size\n"),
++ bfd_archive_filename (abfd), sec);
++ else if (sec->size != 0)
++ {
++ bfd_byte *sec_contents, *l_sec_contents;
++
++ if (!bfd_malloc_and_get_section (abfd, sec, &sec_contents))
++ (*_bfd_error_handler)
++ (_("%B: warning: could not read contents of section `%A'\n"),
++ bfd_archive_filename (abfd), sec);
++ else if (!bfd_malloc_and_get_section (l->sec->owner, l->sec,
++ &l_sec_contents))
++ (*_bfd_error_handler)
++ (_("%B: warning: could not read contents of section `%A'\n"),
++ bfd_archive_filename(l->sec->owner), l->sec);
++ else if (memcmp (sec_contents, l_sec_contents, sec->size) != 0)
++ (*_bfd_error_handler)
++ (_("%B: warning: duplicate section `%A' has different contents\n"),
++ bfd_archive_filename (abfd), sec);
++
++ if (sec_contents)
++ free (sec_contents);
++ if (l_sec_contents)
++ free (l_sec_contents);
++ }
++ break;
+ }
+
+ /* Set the output_section field so that lang_add_section
diff --git a/sources/binutils/2.15.91.0.2/702-binutils-skip-comments.patch b/sources/binutils/2.15.91.0.2/702-binutils-skip-comments.patch
new file mode 100644
index 000000000..804a17e00
--- /dev/null
+++ b/sources/binutils/2.15.91.0.2/702-binutils-skip-comments.patch
@@ -0,0 +1,101 @@
+Retrieved from http://sources.redhat.com/ml/binutils/2004-04/msg00646.html
+Fixes
+localealias.s:544: Error: junk at end of line, first unrecognized character is `,'
+when building glibc-2.3.2 with gcc-3.4.0 and binutils-2.15.90.0.3
+
+Paths adjusted to match crosstool's patcher.
+
+Message-Id: m3n052qw2g.fsf@whitebox.m5r.de
+From: Andreas Schwab <schwab at suse dot de>
+To: Nathan Sidwell <nathan at codesourcery dot com>
+Cc: Ian Lance Taylor <ian at wasabisystems dot com>, binutils at sources dot redhat dot com
+Date: Fri, 23 Apr 2004 22:27:19 +0200
+Subject: Re: demand_empty_rest_of_line and ignore_rest_of_line
+
+Nathan Sidwell <nathan@codesourcery.com> writes:
+
+> Index: read.c
+> ===================================================================
+> RCS file: /cvs/src/src/gas/read.c,v
+> retrieving revision 1.76
+> diff -c -3 -p -r1.76 read.c
+> *** read.c 12 Mar 2004 17:48:12 -0000 1.76
+> --- read.c 18 Mar 2004 09:56:05 -0000
+> *************** read_a_source_file (char *name)
+> *** 1053,1059 ****
+> #endif
+> input_line_pointer--;
+> /* Report unknown char as ignored. */
+> ! ignore_rest_of_line ();
+> }
+>
+> #ifdef md_after_pass_hook
+> --- 1053,1059 ----
+> #endif
+> input_line_pointer--;
+> /* Report unknown char as ignored. */
+> ! demand_empty_rest_of_line ();
+> }
+>
+> #ifdef md_after_pass_hook
+
+This means that the unknown character is no longer ignored, despite the
+comment. As a side effect a line starting with a line comment character
+not followed by APP in NO_APP mode now triggers an error instead of just a
+warning, breaking builds of glibc on m68k-linux. Earlier in
+read_a_source_file where #APP is handled there is another comment that
+claims that unknown comments are ignored, when in fact they aren't (only
+the initial line comment character is skipped).
+
+Note that the presence of #APP will mess up the line counters, but
+that appears to be difficult to fix.
+
+Andreas.
+
+2004-04-23 Andreas Schwab <schwab@suse.de>
+
+ * read.c (read_a_source_file): Ignore unknown text after line
+ comment character. Fix misleading comment.
+
+--- binutils/gas/read.c.~1.78.~ 2004-04-23 08:58:23.000000000 +0200
++++ binutils/gas/read.c 2004-04-23 21:49:01.000000000 +0200
+@@ -1,6 +1,6 @@
+ /* read.c - read a source file -
+ Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+- 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
++ 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+@@ -950,10 +950,14 @@ read_a_source_file (char *name)
+ unsigned int new_length;
+ char *tmp_buf = 0;
+
+- bump_line_counters ();
+ s = input_line_pointer;
+ if (strncmp (s, "APP\n", 4))
+- continue; /* We ignore it */
++ {
++ /* We ignore it */
++ ignore_rest_of_line ();
++ continue;
++ }
++ bump_line_counters ();
+ s += 4;
+
+ sb_new (&sbuf);
+@@ -1052,7 +1056,7 @@ read_a_source_file (char *name)
+ continue;
+ #endif
+ input_line_pointer--;
+- /* Report unknown char as ignored. */
++ /* Report unknown char as error. */
+ demand_empty_rest_of_line ();
+ }
+
+
+--
+Andreas Schwab, SuSE Labs, schwab@suse.de
+SuSE Linux AG, Maxfeldstra&#xC3;e 5, 90409 N&#xC3;rnberg, Germany
+Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
+"And now for something completely different."