summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2016-10-12 17:16:30 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-15 10:01:43 +0100
commit76f42d622bab13c674faa6c1a67163e40086051f (patch)
tree8479b7493cb33983d4bf4f90df3a54f90f36c229 /meta/recipes-devtools/binutils
parentee835e1c6383d8879db42040556482207a018880 (diff)
downloadpoky-76f42d622bab13c674faa6c1a67163e40086051f.tar.gz
binutils: fix for MIPS "Can't find matching LO16 reloc" errors
Patch taken from Binutils Bugzilla: https://sourceware.org/bugzilla/show_bug.cgi?id=20649 (From OE-Core rev: a31eff6894099ee1d0ce7ccf2972f7276ca12743) Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.27.inc1
-rw-r--r--meta/recipes-devtools/binutils/binutils/0015-binutils-mips-gas-pic-relax-linkonce.diff65
2 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.27.inc b/meta/recipes-devtools/binutils/binutils-2.27.inc
index 03b7bedd25..b0c5267456 100644
--- a/meta/recipes-devtools/binutils/binutils-2.27.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.27.inc
@@ -34,6 +34,7 @@ SRC_URI = "\
34 file://0012-Add-support-for-Netlogic-XLP.patch \ 34 file://0012-Add-support-for-Netlogic-XLP.patch \
35 file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \ 35 file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
36 file://0014-libtool-remove-rpath.patch \ 36 file://0014-libtool-remove-rpath.patch \
37 file://0015-binutils-mips-gas-pic-relax-linkonce.diff \
37" 38"
38S = "${WORKDIR}/git" 39S = "${WORKDIR}/git"
39 40
diff --git a/meta/recipes-devtools/binutils/binutils/0015-binutils-mips-gas-pic-relax-linkonce.diff b/meta/recipes-devtools/binutils/binutils/0015-binutils-mips-gas-pic-relax-linkonce.diff
new file mode 100644
index 0000000000..78b971a996
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0015-binutils-mips-gas-pic-relax-linkonce.diff
@@ -0,0 +1,65 @@
1Patch taken from Binutils Bugzilla:
2
3 https://sourceware.org/bugzilla/show_bug.cgi?id=20649
4
5Upstream-Status: Pending
6
7Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
8
9Index: binutils/gas/config/tc-mips.c
10===================================================================
11--- binutils.orig/gas/config/tc-mips.c 2016-09-29 05:12:31.000000000 +0100
12+++ binutils/gas/config/tc-mips.c 2016-09-29 20:05:13.257411084 +0100
13@@ -1353,7 +1353,7 @@ static void s_mips_stab (int);
14 static void s_mips_weakext (int);
15 static void s_mips_file (int);
16 static void s_mips_loc (int);
17-static bfd_boolean pic_need_relax (symbolS *, asection *);
18+static bfd_boolean pic_need_relax (symbolS *);
19 static int relaxed_branch_length (fragS *, asection *, int);
20 static int relaxed_micromips_16bit_branch_length (fragS *, asection *, int);
21 static int relaxed_micromips_32bit_branch_length (fragS *, asection *, int);
22@@ -4258,6 +4258,8 @@ mips_move_text_labels (void)
23 mips_move_labels (seg_info (now_seg)->label_list, TRUE);
24 }
25
26+/* Duplicate the test for LINK_ONCE sections as in `adjust_reloc_syms'. */
27+
28 static bfd_boolean
29 s_is_linkonce (symbolS *sym, segT from_seg)
30 {
31@@ -14823,7 +14825,7 @@ mips_frob_file (void)
32 constants; we'll report an error for those later. */
33 if (got16_reloc_p (l->fixp->fx_r_type)
34 && !(l->fixp->fx_addsy
35- && pic_need_relax (l->fixp->fx_addsy, l->seg)))
36+ && pic_need_relax (l->fixp->fx_addsy)))
37 continue;
38
39 /* Check quickly whether the next fixup happens to be a matching %lo. */
40@@ -17043,7 +17045,7 @@ nopic_need_relax (symbolS *sym, int befo
41 /* Return true if the given symbol should be considered local for SVR4 PIC. */
42
43 static bfd_boolean
44-pic_need_relax (symbolS *sym, asection *segtype)
45+pic_need_relax (symbolS *sym)
46 {
47 asection *symsec;
48
49@@ -17068,7 +17070,6 @@ pic_need_relax (symbolS *sym, asection *
50 return (!bfd_is_und_section (symsec)
51 && !bfd_is_abs_section (symsec)
52 && !bfd_is_com_section (symsec)
53- && !s_is_linkonce (sym, segtype)
54 /* A global or weak symbol is treated as external. */
55 && (!S_IS_WEAK (sym) && !S_IS_EXTERNAL (sym)));
56 }
57@@ -17507,7 +17508,7 @@ md_estimate_size_before_relax (fragS *fr
58 if (mips_pic == NO_PIC)
59 change = nopic_need_relax (fragp->fr_symbol, 0);
60 else if (mips_pic == SVR4_PIC)
61- change = pic_need_relax (fragp->fr_symbol, segtype);
62+ change = pic_need_relax (fragp->fr_symbol);
63 else if (mips_pic == VXWORKS_PIC)
64 /* For vxworks, GOT16 relocations never have a corresponding LO16. */
65 change = 0;