summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils-2.23.2/backport
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils-2.23.2/backport')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-PPC_VLE_SPLIT16A-Delete-unused-macro.patch122
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch46
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch68
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-emultempl-elf32.em-gld-EMULATION_NAME-_before_alloca.patch31
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch196
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-config-tc-ppc.c-md_apply_fix-Sign-extend-fieldval-un.patch85
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-emultempl-elf32.em-gld-EMULATION_NAME-_before_alloca.patch43
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/0003-gold.patch203
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/aarch64-crn.patch117
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/aarch64-movi.patch144
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-ineffectual-zero-of-cache.patch60
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-skip-whitespace-pr14887.patch50
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-replace-strncat-with-strcat.patch26
13 files changed, 1191 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-PPC_VLE_SPLIT16A-Delete-unused-macro.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-PPC_VLE_SPLIT16A-Delete-unused-macro.patch
new file mode 100644
index 0000000000..6057ad5717
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-PPC_VLE_SPLIT16A-Delete-unused-macro.patch
@@ -0,0 +1,122 @@
1config/tc-ppc.c (PPC_VLE_SPLIT16A): Delete unused macro.
2 (PPC_VLE_SPLIT16D, PPC_VLE_LO16A, PPC_VLE_LO16D):
3 Likewise. (PPC_VLE_HI16A, PPC_VLE_HI16D):
4 Likewise. (PPC_VLE_HA16A, PPC_VLE_HA16D):
5 Likewise. (md_apply_fix):
6 Set fx_no_overflow for assorted relocations.
7 Shift and sign-extend fieldval for use by some VLE reloc
8 operand->insert functions.
9
10Upstream-Status: Backport
11
12Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
13
14commit ee75ce72fd7a4b2dc47db46acc36905da8904be4
15Author: Alan Modra <amodra@bigpond.net.au>
16Date: Mon May 6 23:36:48 2013 +0000
17
18--- binutils-2.23.2/gas/config/tc-ppc.c.orig 2013-06-02 21:44:34.000000000 -0500
19+++ binutils-2.23.2/gas/config/tc-ppc.c 2013-06-02 21:51:37.000000000 -0500
20@@ -64,40 +64,14 @@
21 /* #lo(value) denotes the least significant 16 bits of the indicated. */
22 #define PPC_LO(v) ((v) & 0xffff)
23
24-/* Split the indicated value with the msbs in bits 11-15
25- and the lsbs in bits 21-31. */
26-#define PPC_VLE_SPLIT16A(v) ((v & 0xf800) << 11) | (v & 0x7ff)
27-
28-/* Split the indicated value with the msbs in bits 6-10
29- and the lsbs in bits 21-31. */
30-#define PPC_VLE_SPLIT16D(v) ((v & 0xf800) << 5) | (v & 0x7ff)
31-
32-/* #lo(value) denotes the lsb 16 bits in split16a format. */
33-#define PPC_VLE_LO16A(v) PPC_VLE_SPLIT16A(PPC_LO(v))
34-
35-/* #lo(value) denotes the lsb 16 bits in split16d format. */
36-#define PPC_VLE_LO16D(v) PPC_VLE_SPLIT16D(PPC_LO(v))
37-
38 /* #hi(value) denotes bits 16 through 31 of the indicated value. */
39 #define PPC_HI(v) (((v) >> 16) & 0xffff)
40
41-/* #lo(value) denotes the msb 16 bits in split16a format. */
42-#define PPC_VLE_HI16A(v) PPC_VLE_SPLIT16A(PPC_HI(v))
43-
44-/* #lo(value) denotes the msb 16 bits in split16d format. */
45-#define PPC_VLE_HI16D(v) PPC_VLE_SPLIT16D(PPC_HI(v))
46-
47 /* #ha(value) denotes the high adjusted value: bits 16 through 31 of
48 the indicated value, compensating for #lo() being treated as a
49 signed number. */
50 #define PPC_HA(v) PPC_HI ((v) + 0x8000)
51
52-/* #ha(value) denotes the high adjusted value in split16a format. */
53-#define PPC_VLE_HA16A(v) PPC_VLE_SPLIT16A(PPC_HA(v))
54-
55-/* #ha(value) denotes the high adjusted value in split16d format. */
56-#define PPC_VLE_HA16D(v) PPC_VLE_SPLIT16D(PPC_HA(v))
57-
58 /* #higher(value) denotes bits 32 through 47 of the indicated value. */
59 #define PPC_HIGHER(v) (((v) >> 16 >> 16) & 0xffff)
60
61@@ -6379,7 +6353,10 @@
62 fixP->fx_r_type = BFD_RELOC_LO16_PCREL;
63 /* fall through */
64 case BFD_RELOC_LO16_PCREL:
65+ case BFD_RELOC_PPC_VLE_LO16A:
66+ case BFD_RELOC_PPC_VLE_LO16D:
67 fieldval = SEX16 (value);
68+ fixP->fx_no_overflow = 1;
69 break;
70
71 case BFD_RELOC_HI16:
72@@ -6387,7 +6364,10 @@
73 fixP->fx_r_type = BFD_RELOC_HI16_PCREL;
74 /* fall through */
75 case BFD_RELOC_HI16_PCREL:
76+ case BFD_RELOC_PPC_VLE_HI16A:
77+ case BFD_RELOC_PPC_VLE_HI16D:
78 fieldval = SEX16 (PPC_HI (value));
79+ fixP->fx_no_overflow = 1;
80 break;
81
82 case BFD_RELOC_HI16_S:
83@@ -6395,7 +6375,10 @@
84 fixP->fx_r_type = BFD_RELOC_HI16_S_PCREL;
85 /* fall through */
86 case BFD_RELOC_HI16_S_PCREL:
87+ case BFD_RELOC_PPC_VLE_HA16A:
88+ case BFD_RELOC_PPC_VLE_HA16D:
89 fieldval = SEX16 (PPC_HA (value));
90+ fixP->fx_no_overflow = 1;
91 break;
92
93 #ifdef OBJ_ELF
94@@ -6403,24 +6386,28 @@
95 if (fixP->fx_pcrel)
96 goto bad_pcrel;
97 fieldval = SEX16 (PPC_HIGHER (value));
98+ fixP->fx_no_overflow = 1;
99 break;
100
101 case BFD_RELOC_PPC64_HIGHER_S:
102 if (fixP->fx_pcrel)
103 goto bad_pcrel;
104 fieldval = SEX16 (PPC_HIGHERA (value));
105+ fixP->fx_no_overflow = 1;
106 break;
107
108 case BFD_RELOC_PPC64_HIGHEST:
109 if (fixP->fx_pcrel)
110 goto bad_pcrel;
111 fieldval = SEX16 (PPC_HIGHEST (value));
112+ fixP->fx_no_overflow = 1;
113 break;
114
115 case BFD_RELOC_PPC64_HIGHEST_S:
116 if (fixP->fx_pcrel)
117 goto bad_pcrel;
118 fieldval = SEX16 (PPC_HIGHESTA (value));
119+ fixP->fx_no_overflow = 1;
120 break;
121
122 /* The following relocs can't be calculated by the assembler.
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch
new file mode 100644
index 0000000000..55bbc6a6e7
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-config-tc-ppc.c-md_assemble-Do-not-generate-APUinfo-.patch
@@ -0,0 +1,46 @@
1The powerpc assembler can generate .PPC.EMB.apuinfo sections in some
2circumstances. These originate, I think, from the old e500 ABI; in
3any case, they are only defined for 32-bit ABIs, and there is a
4significant amount of code in bfd/elf32-ppc.c to handle them
5appropriately, none of which is in elf64-ppc.c. However, the
6assembler can generate them when building 64-bit code for processors
7such as e5500 (which uses PPC_OPCODE_E500MC). In such circumstances,
8they get generated as PROGBITS rather than NOTE sections, which
9reportedly can cause problems in a Linux kernel build.
10
11Since these sections are only defined in 32-bit ABIs, I think it's
12most appropriate to avoid generating them for 64-bit output, which
13this patch does.
14
15Upstream-Status: Backport
16
17-Khem 2013/03/25
18
19From d77411f56a85225e3f7b674e7172c712f6cd61cb Mon Sep 17 00:00:00 2001
20From: Joseph Myers <joseph@codesourcery.com>
21Date: Fri, 25 Jan 2013 02:02:20 +0000
22Subject: [PATCH] * config/tc-ppc.c (md_assemble): Do not generate
23 APUinfo sections for 64-bit output.
24
25---
26 gas/ChangeLog | 5 +++++
27 gas/config/tc-ppc.c | 3 ++-
28 2 files changed, 7 insertions(+), 1 deletion(-)
29
30diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
31index fd15bea..0929e52 100644
32--- a/gas/config/tc-ppc.c
33+++ b/gas/config/tc-ppc.c
34@@ -3249,7 +3249,8 @@ md_assemble (char *str)
35
36 #ifdef OBJ_ELF
37 /* Do we need/want an APUinfo section? */
38- if ((ppc_cpu & (PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_VLE)) != 0)
39+ if ((ppc_cpu & (PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_VLE)) != 0
40+ && !ppc_obj64)
41 {
42 /* These are all version "1". */
43 if (opcode->flags & PPC_OPCODE_SPE)
44--
451.7.9.5
46
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch
new file mode 100644
index 0000000000..97a40a2a42
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-doc-binutils.texi-elfedit-Fix-use-of-itemx-in-table.patch
@@ -0,0 +1,68 @@
1From e02bf9359f6ef7fe4d341aa5ac4f397f541b9ac3 Mon Sep 17 00:00:00 2001
2From: Andreas Schwab <schwab@linux-m68k.org>
3Date: Fri, 4 Jan 2013 22:27:57 +0000
4Subject: [PATCH] * doc/binutils.texi (elfedit): Fix use of @itemx in @table.
5
6---
7 binutils/ChangeLog | 4 ++++
8 binutils/doc/binutils.texi | 14 +++++++-------
9 2 files changed, 11 insertions(+), 7 deletions(-)
10
11Upstream-Status: Backport
12Index: binutils-2.23.1/binutils/doc/binutils.texi
13===================================================================
14--- binutils-2.23.1.orig/binutils/doc/binutils.texi 2012-05-11 11:18:34.000000000 -0700
15+++ binutils-2.23.1/binutils/doc/binutils.texi 2013-02-26 12:41:51.785114224 -0800
16@@ -12,7 +12,7 @@
17 @c man begin COPYRIGHT
18 Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
19 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
20-2010, 2011, 2012
21+2010, 2011, 2012, 2013
22 Free Software Foundation, Inc.
23
24 Permission is granted to copy, distribute and/or modify this document
25@@ -4375,7 +4375,7 @@
26
27 @table @env
28
29-@itemx --input-mach=@var{machine}
30+@item --input-mach=@var{machine}
31 Set the matching input ELF machine type to @var{machine}. If
32 @option{--input-mach} isn't specified, it will match any ELF
33 machine types.
34@@ -4383,21 +4383,21 @@
35 The supported ELF machine types are, @var{L1OM}, @var{K1OM} and
36 @var{x86-64}.
37
38-@itemx --output-mach=@var{machine}
39+@item --output-mach=@var{machine}
40 Change the ELF machine type in the ELF header to @var{machine}. The
41 supported ELF machine types are the same as @option{--input-mach}.
42
43-@itemx --input-type=@var{type}
44+@item --input-type=@var{type}
45 Set the matching input ELF file type to @var{type}. If
46 @option{--input-type} isn't specified, it will match any ELF file types.
47
48 The supported ELF file types are, @var{rel}, @var{exec} and @var{dyn}.
49
50-@itemx --output-type=@var{type}
51+@item --output-type=@var{type}
52 Change the ELF file type in the ELF header to @var{type}. The
53 supported ELF types are the same as @option{--input-type}.
54
55-@itemx --input-osabi=@var{osabi}
56+@item --input-osabi=@var{osabi}
57 Set the matching input ELF file OSABI to @var{osabi}. If
58 @option{--input-osabi} isn't specified, it will match any ELF OSABIs.
59
60@@ -4407,7 +4407,7 @@
61 @var{FreeBSD}, @var{TRU64}, @var{Modesto}, @var{OpenBSD}, @var{OpenVMS},
62 @var{NSK}, @var{AROS} and @var{FenixOS}.
63
64-@itemx --output-osabi=@var{osabi}
65+@item --output-osabi=@var{osabi}
66 Change the ELF OSABI in the ELF header to @var{osabi}. The
67 supported ELF OSABI are the same as @option{--input-osabi}.
68
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-emultempl-elf32.em-gld-EMULATION_NAME-_before_alloca.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-emultempl-elf32.em-gld-EMULATION_NAME-_before_alloca.patch
new file mode 100644
index 0000000000..050450fae2
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-emultempl-elf32.em-gld-EMULATION_NAME-_before_alloca.patch
@@ -0,0 +1,31 @@
1From 4c147afe1796611c431aa86ea12342c1d80c2c4b Mon Sep 17 00:00:00 2001
2From: "Maciej W. Rozycki" <macro@linux-mips.org>
3Date: Wed, 1 May 2013 17:18:43 +0000
4Subject: [PATCH] * emultempl/elf32.em
5 (gld${EMULATION_NAME}_before_allocation): Use
6 is_elf_hash_table rather than a handcoded condition.
7
8---
9 ld/ChangeLog | 5 +++++
10 ld/emultempl/elf32.em | 2 +-
11 2 files changed, 6 insertions(+), 1 deletion(-)
12
132013-05-01 Maciej W. Rozycki <macro@codesourcery.com>
14
15 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
16 Use is_elf_hash_table rather than a handcoded condition.
17
18Upstream-Status: Backport
19Index: binutils-2.23.2/ld/emultempl/elf32.em
20===================================================================
21--- binutils-2.23.2.orig/ld/emultempl/elf32.em 2013-06-26 23:29:32.000000000 -0700
22+++ binutils-2.23.2/ld/emultempl/elf32.em 2013-06-26 23:35:45.798428256 -0700
23@@ -1494,7 +1494,7 @@
24 asection *sinterp;
25 bfd *abfd;
26
27- if (link_info.hash->type == bfd_link_elf_hash_table)
28+ if (is_elf_hash_table (link_info.hash))
29 _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
30
31 /* If we are going to make any variable assignments, we need to let
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch
new file mode 100644
index 0000000000..83d27d35bb
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0001-ld.texinfo-Replace-with-when-it-is-part-of-the-text.patch
@@ -0,0 +1,196 @@
1From 935f85422863b42b6fbca30885885e3fa28eea36 Mon Sep 17 00:00:00 2001
2From: Nick Clifton <nickc@redhat.com>
3Date: Mon, 7 Jan 2013 12:11:11 +0000
4Subject: [PATCH] * ld.texinfo: Replace @ with @@ when it is part of
5 the text. Correct ordering of M68HC11 entry.
6
7 * doc/binutils.texi: Fix ordering of top level nodes.
8 Replace erroneous uses of @itemx with @item.
9
10 * bfd.texinfo: Replace @ with @@ when it is part of the text.
11---
12 bfd/doc/ChangeLog | 4 ++++
13 bfd/doc/bfd.texinfo | 12 +++++++-----
14 binutils/ChangeLog | 5 +++++
15 binutils/doc/binutils.texi | 8 ++++----
16 ld/ChangeLog | 5 +++++
17 ld/ld.texinfo | 26 ++++++++++++++------------
18 6 files changed, 39 insertions(+), 21 deletions(-)
19
20
21Upstream-Status: Backport
22Index: binutils-2.23.1/bfd/doc/bfd.texinfo
23===================================================================
24--- binutils-2.23.1.orig/bfd/doc/bfd.texinfo 2010-10-28 04:40:25.000000000 -0700
25+++ binutils-2.23.1/bfd/doc/bfd.texinfo 2013-02-26 12:42:26.909115020 -0800
26@@ -1,7 +1,7 @@
27 \input texinfo.tex
28 @setfilename bfd.info
29 @c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000,
30-@c 2001, 2002, 2003, 2006, 2007, 2008, 2009
31+@c 2001, 2002, 2003, 2006, 2007, 2008, 2009, 2013
32 @c Free Software Foundation, Inc.
33 @c
34 @synindex fn cp
35@@ -16,7 +16,8 @@
36 @copying
37 This file documents the BFD library.
38
39-Copyright @copyright{} 1991, 2000, 2001, 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
40+Copyright @copyright{} 1991, 2000, 2001, 2003, 2006, 2007, 2008, 2013
41+Free Software Foundation, Inc.
42
43 Permission is granted to copy, distribute and/or modify this document
44 under the terms of the GNU Free Documentation License, Version 1.3 or
45@@ -64,7 +65,8 @@
46 @end tex
47
48 @vskip 0pt plus 1filll
49-Copyright @copyright{} 1991, 2001, 2003, 2006, 2008 Free Software Foundation, Inc.
50+Copyright @copyright{} 1991, 2001, 2003, 2006, 2008, 2013
51+Free Software Foundation, Inc.
52
53 Permission is granted to copy, distribute and/or modify this document
54 under the terms of the GNU Free Documentation License, Version 1.3
55@@ -322,7 +324,7 @@
56 @printindex cp
57
58 @tex
59-% I think something like @colophon should be in texinfo. In the
60+% I think something like @@colophon should be in texinfo. In the
61 % meantime:
62 \long\def\colophon{\hbox to0pt{}\vfill
63 \centerline{The body of this manual is set in}
64@@ -333,7 +335,7 @@
65 \centerline{{\sl\fontname\tensl\/}}
66 \centerline{are used for emphasis.}\vfill}
67 \page\colophon
68-% Blame: doc@cygnus.com, 28mar91.
69+% Blame: doc@@cygnus.com, 28mar91.
70 @end tex
71
72 @bye
73Index: binutils-2.23.1/binutils/doc/binutils.texi
74===================================================================
75--- binutils-2.23.1.orig/binutils/doc/binutils.texi 2013-02-26 12:41:51.000000000 -0800
76+++ binutils-2.23.1/binutils/doc/binutils.texi 2013-02-26 12:42:26.913115010 -0800
77@@ -148,18 +148,18 @@
78 * objcopy:: Copy and translate object files
79 * objdump:: Display information from object files
80 * ranlib:: Generate index to archive contents
81-* readelf:: Display the contents of ELF format files
82 * size:: List section sizes and total size
83 * strings:: List printable strings from files
84 * strip:: Discard symbols
85-* elfedit:: Update the ELF header of ELF files
86 * c++filt:: Filter to demangle encoded C++ symbols
87 * cxxfilt: c++filt. MS-DOS name for c++filt
88 * addr2line:: Convert addresses to file and line
89 * nlmconv:: Converts object code into an NLM
90-* windres:: Manipulate Windows resources
91 * windmc:: Generator for Windows message resources
92+* windres:: Manipulate Windows resources
93 * dlltool:: Create files needed to build and use DLLs
94+* readelf:: Display the contents of ELF format files
95+* elfedit:: Update the ELF header of ELF files
96 * Common Options:: Command-line options for all utilities
97 * Selecting the Target System:: How these utilities determine the target
98 * Reporting Bugs:: Reporting Bugs
99@@ -2898,7 +2898,7 @@
100 @c man end
101 @end ignore
102
103-@node c++filt, addr2line, elfedit, Top
104+@node c++filt, addr2line, strip, Top
105 @chapter c++filt
106
107 @kindex c++filt
108Index: binutils-2.23.1/ld/ld.texinfo
109===================================================================
110--- binutils-2.23.1.orig/ld/ld.texinfo 2013-02-19 14:26:56.571782665 -0800
111+++ binutils-2.23.1/ld/ld.texinfo 2013-02-26 12:45:20.677119476 -0800
112@@ -1,7 +1,8 @@
113 \input texinfo
114 @setfilename ld.info
115 @c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
116-@c 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
117+@c 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
118+@c 2012, 2013
119 @c Free Software Foundation, Inc.
120 @syncodeindex ky cp
121 @c man begin INCLUDE
122@@ -55,7 +56,8 @@
123 version @value{VERSION}.
124
125 Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
126-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
127+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012, 2013
128+Free Software Foundation, Inc.
129
130 Permission is granted to copy, distribute and/or modify this document
131 under the terms of the GNU Free Documentation License, Version 1.3
132@@ -93,8 +95,8 @@
133 @vskip 0pt plus 1filll
134 @c man begin COPYRIGHT
135 Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
136-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
137-Software Foundation, Inc.
138+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
139+2012, 2013 Free Software Foundation, Inc.
140
141 Permission is granted to copy, distribute and/or modify this document
142 under the terms of the GNU Free Documentation License, Version 1.3
143@@ -142,12 +144,12 @@
144 @ifset ARM
145 * ARM:: ld and the ARM family
146 @end ifset
147-@ifset HPPA
148-* HPPA ELF32:: ld and HPPA 32-bit ELF
149-@end ifset
150 @ifset M68HC11
151 * M68HC11/68HC12:: ld and the Motorola 68HC11 and 68HC12 families
152 @end ifset
153+@ifset HPPA
154+* HPPA ELF32:: ld and HPPA 32-bit ELF
155+@end ifset
156 @ifset M68K
157 * M68K:: ld and Motorola 68K family
158 @end ifset
159@@ -6003,6 +6005,9 @@
160 @ifset I960
161 * i960:: @command{ld} and the Intel 960 family
162 @end ifset
163+@ifset M68HC11
164+* M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families
165+@end ifset
166 @ifset ARM
167 * ARM:: @command{ld} and the ARM family
168 @end ifset
169@@ -6018,9 +6023,6 @@
170 @ifset MSP430
171 * MSP430:: @command{ld} and MSP430
172 @end ifset
173-@ifset M68HC11
174-* M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families
175-@end ifset
176 @ifset POWERPC
177 * PowerPC ELF32:: @command{ld} and PowerPC 32-bit ELF Support
178 @end ifset
179@@ -7868,7 +7870,7 @@
180 @printindex cp
181
182 @tex
183-% I think something like @colophon should be in texinfo. In the
184+% I think something like @@colophon should be in texinfo. In the
185 % meantime:
186 \long\def\colophon{\hbox to0pt{}\vfill
187 \centerline{The body of this manual is set in}
188@@ -7879,7 +7881,7 @@
189 \centerline{{\sl\fontname\tensl\/}}
190 \centerline{are used for emphasis.}\vfill}
191 \page\colophon
192-% Blame: doc@cygnus.com, 28mar91.
193+% Blame: doc@@cygnus.com, 28mar91.
194 @end tex
195
196 @bye
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-config-tc-ppc.c-md_apply_fix-Sign-extend-fieldval-un.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-config-tc-ppc.c-md_apply_fix-Sign-extend-fieldval-un.patch
new file mode 100644
index 0000000000..a62ca4704a
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-config-tc-ppc.c-md_apply_fix-Sign-extend-fieldval-un.patch
@@ -0,0 +1,85 @@
1config/tc-ppc.c (md_apply_fix): Sign extend fieldval under control of operand flag bits.
2
3Upstream-Status: Backport
4
5Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
6
7commit cf5434698882f41ddfcc469488e8a68c674aae03
8Author: Alan Modra <amodra@bigpond.net.au>
9Date: Thu May 9 04:01:53 2013 +0000
10
11--- binutils-2.23.2/gas/config/tc-ppc.c.orig 2013-06-02 21:53:24.000000000 -0500
12+++ binutils-2.23.2/gas/config/tc-ppc.c 2013-06-02 22:03:00.000000000 -0500
13@@ -6355,7 +6355,10 @@
14 case BFD_RELOC_LO16_PCREL:
15 case BFD_RELOC_PPC_VLE_LO16A:
16 case BFD_RELOC_PPC_VLE_LO16D:
17- fieldval = SEX16 (value);
18+ fieldval = value & 0xffff;
19+ sign_extend_16:
20+ if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
21+ fieldval = (fieldval ^ 0x8000) - 0x8000;
22 fixP->fx_no_overflow = 1;
23 break;
24
25@@ -6366,9 +6369,8 @@
26 case BFD_RELOC_HI16_PCREL:
27 case BFD_RELOC_PPC_VLE_HI16A:
28 case BFD_RELOC_PPC_VLE_HI16D:
29- fieldval = SEX16 (PPC_HI (value));
30- fixP->fx_no_overflow = 1;
31- break;
32+ fieldval = PPC_HI (value);
33+ goto sign_extend_16;
34
35 case BFD_RELOC_HI16_S:
36 if (fixP->fx_pcrel)
37@@ -6377,38 +6379,33 @@
38 case BFD_RELOC_HI16_S_PCREL:
39 case BFD_RELOC_PPC_VLE_HA16A:
40 case BFD_RELOC_PPC_VLE_HA16D:
41- fieldval = SEX16 (PPC_HA (value));
42- fixP->fx_no_overflow = 1;
43- break;
44+ fieldval = PPC_HA (value);
45+ goto sign_extend_16;
46
47 #ifdef OBJ_ELF
48 case BFD_RELOC_PPC64_HIGHER:
49 if (fixP->fx_pcrel)
50 goto bad_pcrel;
51- fieldval = SEX16 (PPC_HIGHER (value));
52- fixP->fx_no_overflow = 1;
53- break;
54+ fieldval = PPC_HIGHER (value);
55+ goto sign_extend_16;
56
57 case BFD_RELOC_PPC64_HIGHER_S:
58 if (fixP->fx_pcrel)
59 goto bad_pcrel;
60- fieldval = SEX16 (PPC_HIGHERA (value));
61- fixP->fx_no_overflow = 1;
62- break;
63+ fieldval = PPC_HIGHERA (value);
64+ goto sign_extend_16;
65
66 case BFD_RELOC_PPC64_HIGHEST:
67 if (fixP->fx_pcrel)
68 goto bad_pcrel;
69- fieldval = SEX16 (PPC_HIGHEST (value));
70- fixP->fx_no_overflow = 1;
71- break;
72+ fieldval = PPC_HIGHEST (value);
73+ goto sign_extend_16;
74
75 case BFD_RELOC_PPC64_HIGHEST_S:
76 if (fixP->fx_pcrel)
77 goto bad_pcrel;
78- fieldval = SEX16 (PPC_HIGHESTA (value));
79- fixP->fx_no_overflow = 1;
80- break;
81+ fieldval = PPC_HIGHESTA (value);
82+ goto sign_extend_16;
83
84 /* The following relocs can't be calculated by the assembler.
85 Leave the field zero. */
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-emultempl-elf32.em-gld-EMULATION_NAME-_before_alloca.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-emultempl-elf32.em-gld-EMULATION_NAME-_before_alloca.patch
new file mode 100644
index 0000000000..36e5924d48
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0002-emultempl-elf32.em-gld-EMULATION_NAME-_before_alloca.patch
@@ -0,0 +1,43 @@
1From b0d2b7b6eae7b7f4fbfd1695d4d2f1b45198d597 Mon Sep 17 00:00:00 2001
2From: "Maciej W. Rozycki" <macro@linux-mips.org>
3Date: Fri, 3 May 2013 15:01:19 +0000
4Subject: [PATCH] * emultempl/elf32.em
5 (gld${EMULATION_NAME}_before_allocation): Only call
6 lang_for_each_statement if an ELF hash table is used.
7
8---
9 ld/ChangeLog | 5 +++++
10 ld/emultempl/elf32.em | 12 +++++++-----
11 2 files changed, 12 insertions(+), 5 deletions(-)
12
132013-05-03 Alan Modra <amodra@gmail.com>
14
15 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
16 Only call lang_for_each_statement if an ELF hash table is used.
17
18Upstream-Status: Backport
19
20Index: binutils-2.23.2/ld/emultempl/elf32.em
21===================================================================
22--- binutils-2.23.2.orig/ld/emultempl/elf32.em 2013-06-26 23:35:45.000000000 -0700
23+++ binutils-2.23.2/ld/emultempl/elf32.em 2013-06-26 23:37:04.530429733 -0700
24@@ -1495,12 +1495,14 @@
25 bfd *abfd;
26
27 if (is_elf_hash_table (link_info.hash))
28- _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
29+ {
30+ _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
31
32- /* If we are going to make any variable assignments, we need to let
33- the ELF backend know about them in case the variables are
34- referred to by dynamic objects. */
35- lang_for_each_statement (gld${EMULATION_NAME}_find_statement_assignment);
36+ /* If we are going to make any variable assignments, we need to
37+ let the ELF backend know about them in case the variables are
38+ referred to by dynamic objects. */
39+ lang_for_each_statement (gld${EMULATION_NAME}_find_statement_assignment);
40+ }
41
42 /* Let the ELF backend work out the sizes of any sections required
43 by dynamic linking. */
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0003-gold.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0003-gold.patch
new file mode 100644
index 0000000000..141e66bce2
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/0003-gold.patch
@@ -0,0 +1,203 @@
1From a347c1bd9be53513f60ed0e5f440c1f5cd78dec4 Mon Sep 17 00:00:00 2001
2From: "Maciej W. Rozycki" <macro@linux-mips.org>
3Date: Fri, 3 May 2013 15:19:26 +0000
4Subject: [PATCH] gold/ PR ld/15365 * layout.cc
5 (Layout::finalize): Make __ehdr_start STV_HIDDEN.
6
7 ld/
8 PR ld/15365
9 * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
10 Restrict __ehdr_start's export class to no less than STV_HIDDEN.
11
12 ld/testsuite/
13 PR ld/15365
14 * ld-elf/ehdr_start.d: Expect __ehdr_start to be STB_LOCAL.
15 * ld-mips-elf/ehdr_start-1.nd: New test.
16 * ld-mips-elf/ehdr_start-2.nd: New test.
17 * ld-mips-elf/ehdr_start-1.ld: New test linker script.
18 * ld-mips-elf/ehdr_start-2.ld: New test linker script.
19 * ld-mips-elf/ehdr_start-new.s: New test source.
20 * ld-mips-elf/ehdr_start-o32.s: New test source.
21 * ld-mips-elf/mips-elf.exp: Run the new tests.
22---
23 gold/ChangeLog | 5 +++++
24 gold/layout.cc | 2 +-
25 ld/ChangeLog | 6 ++++++
26 ld/emultempl/elf32.em | 7 +++++++
27 ld/testsuite/ChangeLog | 12 ++++++++++++
28 ld/testsuite/ld-elf/ehdr_start.d | 2 +-
29 ld/testsuite/ld-mips-elf/ehdr_start-1.ld | 9 +++++++++
30 ld/testsuite/ld-mips-elf/ehdr_start-1.nd | 4 ++++
31 ld/testsuite/ld-mips-elf/ehdr_start-2.ld | 10 ++++++++++
32 ld/testsuite/ld-mips-elf/ehdr_start-2.nd | 4 ++++
33 ld/testsuite/ld-mips-elf/ehdr_start-new.s | 13 +++++++++++++
34 ld/testsuite/ld-mips-elf/ehdr_start-o32.s | 14 ++++++++++++++
35 ld/testsuite/ld-mips-elf/mips-elf.exp | 25 +++++++++++++++++++++++++
36 13 files changed, 111 insertions(+), 2 deletions(-)
37 create mode 100644 ld/testsuite/ld-mips-elf/ehdr_start-1.ld
38 create mode 100644 ld/testsuite/ld-mips-elf/ehdr_start-1.nd
39 create mode 100644 ld/testsuite/ld-mips-elf/ehdr_start-2.ld
40 create mode 100644 ld/testsuite/ld-mips-elf/ehdr_start-2.nd
41 create mode 100644 ld/testsuite/ld-mips-elf/ehdr_start-new.s
42 create mode 100644 ld/testsuite/ld-mips-elf/ehdr_start-o32.s
43
44Upstream-Status: Backport
45Index: binutils-2.23.2/gold/layout.cc
46===================================================================
47--- binutils-2.23.2.orig/gold/layout.cc 2013-06-26 23:29:32.000000000 -0700
48+++ binutils-2.23.2/gold/layout.cc 2013-06-26 23:39:22.170432315 -0700
49@@ -2516,7 +2516,7 @@
50 symtab->define_in_output_segment("__ehdr_start", NULL,
51 Symbol_table::PREDEFINED, load_seg, 0, 0,
52 elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
53- elfcpp::STV_DEFAULT, 0,
54+ elfcpp::STV_HIDDEN, 0,
55 Symbol::SEGMENT_START, true);
56
57 // Set the file offsets of all the non-data sections we've seen so
58Index: binutils-2.23.2/ld/emultempl/elf32.em
59===================================================================
60--- binutils-2.23.2.orig/ld/emultempl/elf32.em 2013-06-26 23:37:04.000000000 -0700
61+++ binutils-2.23.2/ld/emultempl/elf32.em 2013-06-26 23:39:22.174432315 -0700
62@@ -1498,6 +1498,13 @@
63 {
64 _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
65
66+ /* Make __ehdr_start hidden if it has been referenced, to
67+ prevent the symbol from being dynamic. */
68+ if (!bfd_elf_record_link_assignment (link_info.output_bfd, &link_info,
69+ "__ehdr_start", TRUE, TRUE))
70+ einfo ("%P%F: failed to record assignment to %s: %E\n",
71+ "__ehdr_start");
72+
73 /* If we are going to make any variable assignments, we need to
74 let the ELF backend know about them in case the variables are
75 referred to by dynamic objects. */
76Index: binutils-2.23.2/ld/testsuite/ld-elf/ehdr_start.d
77===================================================================
78--- binutils-2.23.2.orig/ld/testsuite/ld-elf/ehdr_start.d 2013-06-26 23:29:32.000000000 -0700
79+++ binutils-2.23.2/ld/testsuite/ld-elf/ehdr_start.d 2013-06-26 23:39:22.174432315 -0700
80@@ -4,5 +4,5 @@
81 #target: *-*-linux* *-*-gnu* *-*-nacl*
82
83 #...
84-[0-9a-f]*000 [ADRT] __ehdr_start
85+[0-9a-f]*000 [Adrt] __ehdr_start
86 #pass
87Index: binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-1.ld
88===================================================================
89--- /dev/null 1970-01-01 00:00:00.000000000 +0000
90+++ binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-1.ld 2013-06-26 23:39:22.174432315 -0700
91@@ -0,0 +1,9 @@
92+ENTRY (__start)
93+SECTIONS
94+{
95+ . = 0x12300000 + SIZEOF_HEADERS;
96+ .text : { *(.text) }
97+ . = 0x23400000;
98+ HIDDEN (_gp = ALIGN (16) + 0x7ff0);
99+ .got : { *(.got) }
100+}
101Index: binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-1.nd
102===================================================================
103--- /dev/null 1970-01-01 00:00:00.000000000 +0000
104+++ binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-1.nd 2013-06-26 23:39:22.174432315 -0700
105@@ -0,0 +1,4 @@
106+Symbol table '\.symtab' contains [0-9]+ entries:
107+#...
108+ *[0-9]+: 0*12300000 +0 (?:NOTYPE|OBJECT) +LOCAL +DEFAULT +[0-9]+ __ehdr_start
109+#pass
110Index: binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-2.ld
111===================================================================
112--- /dev/null 1970-01-01 00:00:00.000000000 +0000
113+++ binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-2.ld 2013-06-26 23:39:22.174432315 -0700
114@@ -0,0 +1,10 @@
115+ENTRY (__start)
116+SECTIONS
117+{
118+ . = 0x12300000 + SIZEOF_HEADERS;
119+ .text : { *(.text) }
120+ . = 0x23400000;
121+ __ehdr_start = .;
122+ HIDDEN (_gp = ALIGN (16) + 0x7ff0);
123+ .got : { *(.got) }
124+}
125Index: binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-2.nd
126===================================================================
127--- /dev/null 1970-01-01 00:00:00.000000000 +0000
128+++ binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-2.nd 2013-06-26 23:39:22.178432315 -0700
129@@ -0,0 +1,4 @@
130+Symbol table '\.symtab' contains [0-9]+ entries:
131+#...
132+ *[0-9]+: 0*23400000 +0 (?:NOTYPE|OBJECT) +LOCAL +DEFAULT +[0-9]+ __ehdr_start
133+#pass
134Index: binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-new.s
135===================================================================
136--- /dev/null 1970-01-01 00:00:00.000000000 +0000
137+++ binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-new.s 2013-06-26 23:39:22.178432315 -0700
138@@ -0,0 +1,13 @@
139+ .abicalls
140+ .text
141+ .weak __ehdr_start
142+ .globl __start
143+ .ent __start
144+ .frame $29, 0, $31
145+ .mask 0x00000000, 0
146+__start:
147+ .cplocal $2
148+ .cpsetup $t9, $zero, __start
149+ lw $2, __ehdr_start
150+ jr $31
151+ .end __start
152Index: binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-o32.s
153===================================================================
154--- /dev/null 1970-01-01 00:00:00.000000000 +0000
155+++ binutils-2.23.2/ld/testsuite/ld-mips-elf/ehdr_start-o32.s 2013-06-26 23:39:22.178432315 -0700
156@@ -0,0 +1,14 @@
157+ .abicalls
158+ .text
159+ .weak __ehdr_start
160+ .globl __start
161+ .ent __start
162+ .frame $29, 0, $31
163+ .mask 0x00000000, 0
164+__start:
165+ .set noreorder
166+ .cpload $25
167+ .set reorder
168+ lw $2, __ehdr_start
169+ jr $31
170+ .end __start
171Index: binutils-2.23.2/ld/testsuite/ld-mips-elf/mips-elf.exp
172===================================================================
173--- binutils-2.23.2.orig/ld/testsuite/ld-mips-elf/mips-elf.exp 2013-06-26 23:29:32.000000000 -0700
174+++ binutils-2.23.2/ld/testsuite/ld-mips-elf/mips-elf.exp 2013-06-26 23:39:22.178432315 -0700
175@@ -669,3 +669,28 @@
176 "readelf -A export-class-call16-${abi}.gd"] \
177 "export-class-call16-${abi}.so"]]
178 }
179+
180+# Magic __ehdr_start symbol tests.
181+set abis [concat o32 [expr {$has_newabi ? "n32 n64" : ""}]]
182+foreach { abi } $abis {
183+ set suff [string map {o32 o32 n32 new n64 new} $abi]
184+ run_ld_link_tests [list \
185+ [list \
186+ "MIPS magic __ehdr_start symbol test 1 ($abi)" \
187+ "$abi_ldflags($abi) -T ehdr_start-1.ld" "" \
188+ "$abi_asflags($abi)" \
189+ [list ehdr_start-${suff}.s] \
190+ [list "readelf -s ehdr_start-1.nd"] \
191+ "ehdr_start-1-${abi}"]]
192+ if [regexp "(?:n32|n64)" "$abi"] {
193+ setup_kfail "mips*-*-*" "ld/15428"
194+ }
195+ run_ld_link_tests [list \
196+ [list \
197+ "MIPS magic __ehdr_start symbol test 2 ($abi)" \
198+ "$abi_ldflags($abi) -T ehdr_start-2.ld" "" \
199+ "$abi_asflags($abi)" \
200+ [list ehdr_start-${suff}.s] \
201+ [list "readelf -s ehdr_start-2.nd"] \
202+ "ehdr_start-2-${abi}"]]
203+}
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/aarch64-crn.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/aarch64-crn.patch
new file mode 100644
index 0000000000..920ccbc3e6
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/aarch64-crn.patch
@@ -0,0 +1,117 @@
1From: Yufeng Zhang <yufeng.zhang@arm.com>
2Date: Mon, 13 May 2013 22:50:00 +0000 (+0000)
3Subject: gas/
4X-Git-Url: http://sourceware.org/git/?p=binutils.git;a=commitdiff_plain;h=1796bf893c4729d5c523502318d72cae78495d6c
5
6Upstream-Status: backport
7
8gas/
9
10 Backport from mainline:
11
12 2013-02-27 Yufeng Zhang <yufeng.zhang@arm.com>
13 * config/tc-aarch64.c (parse_sys_reg): Allow the full range of CRn
14 for system registers.
15
16gas/testsuite/
17
18 Backport from mainline:
19
20 2013-02-27 Yufeng Zhang <yufeng.zhang@arm.com>
21 * gas/aarch64/illegal.l: Delete the error message for
22 msr S3_1_C13_C15_1,x7.
23 * gas/aarch64/sysreg.s: Add new tests.
24 * gas/aarch64/sysreg.d: Update.
25---
26
27diff --git a/gas/ChangeLog b/gas/ChangeLog
28index 821acc9..3d09792 100644
29--- a/gas/ChangeLog
30+++ b/gas/ChangeLog
31@@ -1,3 +1,11 @@
32+2013-05-13 Yufeng Zhang <yufeng.zhang@arm.com>
33+
34+ Backport from mainline:
35+
36+ 2013-02-27 Yufeng Zhang <yufeng.zhang@arm.com>
37+ * config/tc-aarch64.c (parse_sys_reg): Allow the full range of CRn
38+ for system registers.
39+
40 2013-03-05 Yufeng Zhang <yufeng.zhang@arm.com>
41
42 * config/tc-aarch64.c (aarch64_imm_float_p): Rename 'e' to 'pattern';
43diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
44index 162c865..db28c71 100644
45--- a/gas/config/tc-aarch64.c
46+++ b/gas/config/tc-aarch64.c
47@@ -3243,10 +3243,14 @@ parse_sys_reg (char **str, struct hash_control *sys_regs, int imple_defined_p)
48 unsigned int op0, op1, cn, cm, op2;
49 if (sscanf (buf, "s%u_%u_c%u_c%u_%u", &op0, &op1, &cn, &cm, &op2) != 5)
50 return PARSE_FAIL;
51- /* Register access is encoded as follows:
52+ /* The architecture specifies the encoding space for implementation
53+ defined registers as:
54 op0 op1 CRn CRm op2
55- 11 xxx 1x11 xxxx xxx. */
56- if (op0 != 3 || op1 > 7 || (cn | 0x4) != 0xf || cm > 15 || op2 > 7)
57+ 11 xxx 1x11 xxxx xxx
58+ For convenience GAS accepts a wider encoding space, as follows:
59+ op0 op1 CRn CRm op2
60+ 11 xxx xxxx xxxx xxx */
61+ if (op0 != 3 || op1 > 7 || cn > 15 || cm > 15 || op2 > 7)
62 return PARSE_FAIL;
63 value = (op0 << 14) | (op1 << 11) | (cn << 7) | (cm << 3) | op2;
64 }
65diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
66index d1ebc3b..8ee06c8 100644
67--- a/gas/testsuite/ChangeLog
68+++ b/gas/testsuite/ChangeLog
69@@ -1,3 +1,13 @@
70+2013-05-13 Yufeng Zhang <yufeng.zhang@arm.com>
71+
72+ Backport from mainline:
73+
74+ 2013-02-27 Yufeng Zhang <yufeng.zhang@arm.com>
75+ * gas/aarch64/illegal.l: Delete the error message for
76+ msr S3_1_C13_C15_1,x7.
77+ * gas/aarch64/sysreg.s: Add new tests.
78+ * gas/aarch64/sysreg.d: Update.
79+
80 2013-03-08 Christian Groessler <chris@groessler.org>
81
82 Backport from mainline:
83diff --git a/gas/testsuite/gas/aarch64/illegal.l b/gas/testsuite/gas/aarch64/illegal.l
84index e17a1de..f7e4074 100644
85--- a/gas/testsuite/gas/aarch64/illegal.l
86+++ b/gas/testsuite/gas/aarch64/illegal.l
87@@ -520,7 +520,6 @@
88 [^:]*:496: Error: .*`str x1,page_table_count'
89 [^:]*:498: Error: .*`prfm PLDL3KEEP,\[x9,x15,sxtx#2\]'
90 [^:]*:500: Error: .*`mrs x5,S1_0_C13_C8_0'
91-[^:]*:501: Error: .*`msr S3_1_C13_C15_1,x7'
92 [^:]*:502: Error: .*`msr S3_1_C11_C15_-1,x7'
93 [^:]*:503: Error: .*`msr S3_1_11_15_1,x7'
94 [^:]*:506: Error: .*`movi w1,#15'
95diff --git a/gas/testsuite/gas/aarch64/sysreg.d b/gas/testsuite/gas/aarch64/sysreg.d
96index b83b270..c7cf00e 100644
97--- a/gas/testsuite/gas/aarch64/sysreg.d
98+++ b/gas/testsuite/gas/aarch64/sysreg.d
99@@ -23,3 +23,6 @@ Disassembly of section \.text:
100 3c: d5380260 mrs x0, id_isar3_el1
101 40: d5380280 mrs x0, id_isar4_el1
102 44: d53802a0 mrs x0, id_isar5_el1
103+ 48: d538cc00 mrs x0, s3_0_c12_c12_0
104+ 4c: d5384600 mrs x0, s3_0_c4_c6_0
105+ 50: d5184600 msr s3_0_c4_c6_0, x0
106diff --git a/gas/testsuite/gas/aarch64/sysreg.s b/gas/testsuite/gas/aarch64/sysreg.s
107index e6f770e..3287594 100644
108--- a/gas/testsuite/gas/aarch64/sysreg.s
109+++ b/gas/testsuite/gas/aarch64/sysreg.s
110@@ -22,3 +22,7 @@
111 mrs x0, id_isar3_el1
112 mrs x0, id_isar4_el1
113 mrs x0, id_isar5_el1
114+
115+ mrs x0, s3_0_c12_c12_0
116+ mrs x0, s3_0_c4_c6_0
117+ msr s3_0_c4_c6_0, x0
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/aarch64-movi.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/aarch64-movi.patch
new file mode 100644
index 0000000000..314eef27f0
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/aarch64-movi.patch
@@ -0,0 +1,144 @@
1From: Yufeng Zhang <yufeng.zhang@arm.com>
2Date: Mon, 13 May 2013 23:09:51 +0000 (+0000)
3Subject: gas/testsuite/
4X-Git-Url: http://sourceware.org/git/?p=binutils.git;a=commitdiff_plain;h=f426901e1be0f58fe4e9386cada50ca57d0a4f36
5
6Upstream-Status: backport
7
8gas/testsuite/
9
10 Backport from mainline:
11
12 2013-05-13 Yufeng Zhang <yufeng.zhang@arm.com>
13 * gas/aarch64/diagnostic.s: Update.
14 * gas/aarch64/diagnostic.l: Ditto.
15 * gas/aarch64/movi.s: Add new tests.
16 * gas/aarch64/movi.d: Update.
17
18opcodes/
19
20 Backport from mainline:
21
22 2013-05-13 Yufeng Zhang <yufeng.zhang@arm.com>
23 * aarch64-asm.c (aarch64_ins_advsimd_imm_modified): Remove assertion.
24 * aarch64-opc.c (operand_general_constraint_met_p): Relax the range
25 check from [0, 255] to [-128, 255].
26---
27
28diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
29index 8ee06c8..475c93a 100644
30--- a/gas/testsuite/ChangeLog
31+++ b/gas/testsuite/ChangeLog
32@@ -1,3 +1,13 @@
33+2013-05-13 Yufeng Zhang <yufeng.zhang@arm.com>
34+
35+ Backport from mainline:
36+
37+ 2013-05-13 Yufeng Zhang <yufeng.zhang@arm.com>
38+ * gas/aarch64/diagnostic.s: Update.
39+ * gas/aarch64/diagnostic.l: Ditto.
40+ * gas/aarch64/movi.s: Add new tests.
41+ * gas/aarch64/movi.d: Update.
42+
43 2013-05-13 Yufeng Zhang <yufeng.zhang@arm.com>
44
45 Backport from mainline:
46diff --git a/gas/testsuite/gas/aarch64/diagnostic.l b/gas/testsuite/gas/aarch64/diagnostic.l
47index f37f11c..d7a1347 100644
48--- a/gas/testsuite/gas/aarch64/diagnostic.l
49+++ b/gas/testsuite/gas/aarch64/diagnostic.l
50@@ -38,8 +38,8 @@
51 [^:]*:40: Error: invalid shift amount at operand 3 -- `shll v1.4s,v2.4h,#32'
52 [^:]*:41: Error: immediate value out of range 0 to 31 at operand 3 -- `shl v1.2s,v2.2s,32'
53 [^:]*:42: Error: immediate value out of range 1 to 8 at operand 3 -- `sqshrn2 v2.16b,v3.8h,#17'
54-[^:]*:43: Error: immediate value out of range 0 to 255 at operand 2 -- `movi v1.4h,256'
55-[^:]*:44: Error: immediate value out of range 0 to 255 at operand 2 -- `movi v1.4h,-1'
56+[^:]*:43: Error: immediate value out of range -128 to 255 at operand 2 -- `movi v1.4h,256'
57+[^:]*:44: Error: immediate value out of range -128 to 255 at operand 2 -- `movi v1.4h,-129'
58 [^:]*:45: Error: invalid shift operator at operand 2 -- `movi v1.4h,255,msl#8'
59 [^:]*:46: Error: invalid value for immediate at operand 2 -- `movi d0,256'
60 [^:]*:47: Error: immediate value should be a multiple of 8 at operand 2 -- `movi v1.4h,255,lsl#7'
61diff --git a/gas/testsuite/gas/aarch64/diagnostic.s b/gas/testsuite/gas/aarch64/diagnostic.s
62index 99ebf8f..e5443ab 100644
63--- a/gas/testsuite/gas/aarch64/diagnostic.s
64+++ b/gas/testsuite/gas/aarch64/diagnostic.s
65@@ -41,7 +41,7 @@
66 shl v1.2s, v2.2s, 32
67 sqshrn2 v2.16b, v3.8h, #17
68 movi v1.4h, 256
69- movi v1.4h, -1
70+ movi v1.4h, -129
71 movi v1.4h, 255, msl #8
72 movi d0, 256
73 movi v1.4h, 255, lsl #7
74diff --git a/gas/testsuite/gas/aarch64/movi.d b/gas/testsuite/gas/aarch64/movi.d
75index 2c73cc4..c225b21 100644
76--- a/gas/testsuite/gas/aarch64/movi.d
77+++ b/gas/testsuite/gas/aarch64/movi.d
78@@ -8201,3 +8201,6 @@ Disassembly of section \.text:
79 8004: 6f07e7e0 movi v0.2d, #0xffffffffffffffff
80 8008: 6f07e7e0 movi v0.2d, #0xffffffffffffffff
81 800c: 2f07e7ff movi d31, #0xffffffffffffffff
82+ 8010: 0f04e403 movi v3.8b, #0x80
83+ 8014: 0f04e423 movi v3.8b, #0x81
84+ 8018: 0f07e7e3 movi v3.8b, #0xff
85diff --git a/gas/testsuite/gas/aarch64/movi.s b/gas/testsuite/gas/aarch64/movi.s
86index 99ca34a..76f2d47 100644
87--- a/gas/testsuite/gas/aarch64/movi.s
88+++ b/gas/testsuite/gas/aarch64/movi.s
89@@ -102,3 +102,8 @@
90 movi v0.2d, bignum
91 movi d31, 18446744073709551615
92 .set bignum, 0xffffffffffffffff
93+
94+ // Allow -128 to 255 in #<imm8>
95+ movi v3.8b, -128
96+ movi v3.8b, -127
97+ movi v3.8b, -1
98diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
99index 96dfaeb..4adbc86 100644
100--- a/opcodes/ChangeLog
101+++ b/opcodes/ChangeLog
102@@ -1,3 +1,12 @@
103+2013-05-13 Yufeng Zhang <yufeng.zhang@arm.com>
104+
105+ Backport from mainline:
106+
107+ 2013-05-13 Yufeng Zhang <yufeng.zhang@arm.com>
108+ * aarch64-asm.c (aarch64_ins_advsimd_imm_modified): Remove assertion.
109+ * aarch64-opc.c (operand_general_constraint_met_p): Relax the range
110+ check from [0, 255] to [-128, 255].
111+
112 2013-03-25 Tristan Gingold <gingold@adacore.com>
113 Backport of: 2013-03-08 Yann Sionneau <yann.sionneau@gmail.com>
114
115diff --git a/opcodes/aarch64-asm.c b/opcodes/aarch64-asm.c
116index 16cdaa9..ba463d9 100644
117--- a/opcodes/aarch64-asm.c
118+++ b/opcodes/aarch64-asm.c
119@@ -369,7 +369,6 @@ aarch64_ins_advsimd_imm_modified (const aarch64_operand *self ATTRIBUTE_UNUSED,
120 imm = aarch64_shrink_expanded_imm8 (imm);
121 assert ((int)imm >= 0);
122 }
123- assert (imm <= 255);
124 insert_fields (code, imm, 0, 2, FLD_defgh, FLD_abc);
125
126 if (kind == AARCH64_MOD_NONE)
127diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
128index 73a760a..32f34c6 100644
129--- a/opcodes/aarch64-opc.c
130+++ b/opcodes/aarch64-opc.c
131@@ -1724,10 +1724,10 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
132 assert (idx == 1);
133 if (aarch64_get_qualifier_esize (opnds[0].qualifier) != 8)
134 {
135- /* uimm8 */
136- if (!value_in_range_p (opnd->imm.value, 0, 255))
137+ /* uimm8 or simm8 */
138+ if (!value_in_range_p (opnd->imm.value, -128, 255))
139 {
140- set_imm_out_of_range_error (mismatch_detail, idx, 0, 255);
141+ set_imm_out_of_range_error (mismatch_detail, idx, -128, 255);
142 return 0;
143 }
144 }
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-ineffectual-zero-of-cache.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-ineffectual-zero-of-cache.patch
new file mode 100644
index 0000000000..a4aebf3be0
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-ineffectual-zero-of-cache.patch
@@ -0,0 +1,60 @@
1Upstream-Status: Backport
2
3* elf32-xtensa.c
4 * (free_section_cache): Renamed from clear_section_cache.
5 * (section_cache_section): Remove ineffectual zero of cache.
6 Call init_section_cache instead.
7
8binutils build might fail on recent Linux distros:
9binutils-2.23.1/bfd/elf32-xtensa.c:6078:36: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
10 memset (sec_cache, 0, sizeof (sec_cache));
11 ^
12binutils-2.23.1/bfd/elf32-xtensa.c:6120:32: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
13 memset (sec_cache, 0, sizeof (sec_cache));
14
15The original commit is http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-xtensa.c.diff?r1=1.135&r2=1.136&cvsroot=src
16
17Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
18
19--- binutils-2.23.1/bfd/elf32-xtensa.c.org 2013-03-12 03:04:29.000000000 -0500
20+++ binutils-2.23.1/bfd/elf32-xtensa.c 2013-03-12 03:06:37.000000000 -0500
21@@ -6067,7 +6067,7 @@
22
23
24 static void
25-clear_section_cache (section_cache_t *sec_cache)
26+free_section_cache (section_cache_t *sec_cache)
27 {
28 if (sec_cache->sec)
29 {
30@@ -6075,7 +6075,6 @@
31 release_internal_relocs (sec_cache->sec, sec_cache->relocs);
32 if (sec_cache->ptbl)
33 free (sec_cache->ptbl);
34- memset (sec_cache, 0, sizeof (sec_cache));
35 }
36 }
37
38@@ -6116,8 +6115,8 @@
39 goto err;
40
41 /* Fill in the new section cache. */
42- clear_section_cache (sec_cache);
43- memset (sec_cache, 0, sizeof (sec_cache));
44+ free_section_cache (sec_cache);
45+ init_section_cache (sec_cache);
46
47 sec_cache->sec = sec;
48 sec_cache->contents = contents;
49@@ -8272,8 +8271,9 @@
50 #endif /* DEBUG */
51
52 error_return:
53- if (prop_table) free (prop_table);
54- clear_section_cache (&target_sec_cache);
55+ if (prop_table)
56+ free (prop_table);
57+ free_section_cache (&target_sec_cache);
58
59 release_contents (sec, contents);
60 release_internal_relocs (sec, internal_relocs);
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-skip-whitespace-pr14887.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-skip-whitespace-pr14887.patch
new file mode 100644
index 0000000000..e504b3b92c
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-fix-skip-whitespace-pr14887.patch
@@ -0,0 +1,50 @@
1
2
3PR gas/14887
4 * config/tc-arm.c (skip_past_char): Skip whitespace before the anticipated character.
5 * config/tc-arm.c (parse_address_main): Delete skip of whitespace here as it is no longer needed.
6
7Upstream-Status: Backport [PR14887]
8
9Signed-off-by: Saul Wold <sgw@linux.intel.com>
10
11===================================================================
12RCS file: /cvs/src/src/gas/ChangeLog,v
13retrieving revision 1.4898
14retrieving revision 1.4899
15Index: binutils-2.23.2/gas/config/tc-arm.c
16===================================================================
17--- binutils-2.23.2.orig/gas/config/tc-arm.c
18+++ binutils-2.23.2/gas/config/tc-arm.c
19@@ -885,6 +885,9 @@ const char FLT_CHARS[] = "rRsSfFdDxXeEpP
20 static inline int
21 skip_past_char (char ** str, char c)
22 {
23+ /* PR gas/14987: Allow for whitespace before the expected character. */
24+ skip_whitespace (*str);
25+
26 if (**str == c)
27 {
28 (*str)++;
29@@ -5168,6 +5171,9 @@ parse_address_main (char **str, int i, i
30 return PARSE_OPERAND_SUCCESS;
31 }
32
33+ /* PR gas/14987: Allow for whitespace before the expected character. */
34+ skip_whitespace (p);
35+
36 if ((reg = arm_reg_parse (&p, REG_TYPE_RN)) == FAIL)
37 {
38 inst.error = _(reg_expected_msgs[REG_TYPE_RN]);
39Index: binutils-2.23.2/gas/testsuite/gas/arm/neon-ldst-es.s
40===================================================================
41--- binutils-2.23.2.orig/gas/testsuite/gas/arm/neon-ldst-es.s
42+++ binutils-2.23.2/gas/testsuite/gas/arm/neon-ldst-es.s
43@@ -57,3 +57,7 @@
44 vld2.32 {q1},[r7]
45 vld4.32 {q1-q2},[r7]
46 vld4.32 {q14-q15},[r7]
47+
48+ @ PR 14987 and 14887: Allow for whitespace in the instruction.
49+ vld1.32 { d1 [ ] } , [ r2 ] , r3
50+
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-replace-strncat-with-strcat.patch b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-replace-strncat-with-strcat.patch
new file mode 100644
index 0000000000..bc8f92b8ae
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.2/backport/binutils-replace-strncat-with-strcat.patch
@@ -0,0 +1,26 @@
1Upstream-Status: Backport
2
3* arc-dis.c (write_comments_): Don't use strncat due to
4 the size of state->commentBuffer pointer isn't predictable.
5
6binutils build will fail on Fedora18+.
7binutils-2.23.1/opcodes/arc-dis.c:430:13: error: argument to 'sizeof' in '__builtin_strncat' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
8 sizeof (state->commentBuffer));
9 ^
10
11The original commit is http://sourceware.org/cgi-bin/cvsweb.cgi/src/opcodes/arc-dis.c.diff?r1=1.17&r2=1.18&cvsroot=src
12
13Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
14
15--- binutils-2.23.1/opcodes/arc-dis.c.orig 2013-03-13 00:10:27.978498158 -0500
16+++ binutils-2.23.1/opcodes/arc-dis.c 2013-03-13 00:11:28.297499381 -0500
17@@ -426,8 +426,7 @@
18 strcpy (state->commentBuffer, comment_prefix);
19 else
20 strcat (state->commentBuffer, ", ");
21- strncat (state->commentBuffer, state->comm[i],
22- sizeof (state->commentBuffer));
23+ strcat (state->commentBuffer, state->comm[i]);
24 }
25 }
26 }