aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFathi Boudra <fathi.boudra@linaro.org>2014-09-01 09:23:22 +0300
committerFathi Boudra <fathi.boudra@linaro.org>2014-09-01 09:23:22 +0300
commite848457751c0990f0ca6c4fbf205d5dc8f74ee35 (patch)
tree6ca1b0b014e26f29c97d900852b7b0c5bc5ade71
parent32fc90551b68c28539c19fd7f1a0cf536710126f (diff)
binutils: update to Linaro binutils 2.24-2014.09 release
* update SRC_URI and checksums * sync patches with openembedded-core * src-release is missing from Linaro tarball - remove for now Change-Id: I3c3b4ac809c5c446c6fdfd61e7b03736b7b913d5 Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
-rw-r--r--meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24.inc13
-rw-r--r--meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch31
-rw-r--r--meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uninitialised-warning.patch50
-rw-r--r--meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr16428.patch123
-rw-r--r--meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/replace_macros_with_static_inline.patch188
5 files changed, 400 insertions, 5 deletions
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24.inc b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24.inc
index 4221683c..d8075a89 100644
--- a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24.inc
+++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24.inc
@@ -1,10 +1,9 @@
BPV = "2.24.0"
-MMYY = "14.08"
+MMYY = "14.09"
RELEASE = "20${MMYY}"
PR = "r${RELEASE}"
LIC_FILES_CHKSUM="\
- file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\
file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
@@ -17,7 +16,7 @@ LIC_FILES_CHKSUM="\
"
SRC_URI = "\
- http://releases.linaro.org/${MMYY}/components/toolchain/binutils-linaro/binutils-linaro-${BPV}-${RELEASE}.tar.bz2 \
+ http://releases.linaro.org/${MMYY}/components/toolchain/binutils-linaro/binutils-linaro-${BPV}-${RELEASE}.tar.xz \
file://binutils-uclibc-100-uclibc-conf.patch \
file://binutils-uclibc-300-001_ld_makefile_patch.patch \
file://binutils-uclibc-300-006_better_file_error.patch \
@@ -33,11 +32,15 @@ SRC_URI = "\
file://fix-pr15815.patch;apply=no \
file://fix-pr2404.patch \
file://fix-pr16476.patch \
+ file://fix-pr16428.patch \
+ file://replace_macros_with_static_inline.patch;apply=no \
+ file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch;apply=no \
+ file://binutils-uninitialised-warning.patch \
file://0001-AArch64-Define-LP64-LE-loader-name.patch \
file://0001-AArch64-Define-LP64-BE-linker-name.patch \
"
-SRC_URI[md5sum] = "56419b23e337bbfc3dce6d977ccb07c7"
-SRC_URI[sha256sum] = "59c01b16557a47ad79e45422ada85baa53477ec6d2618ed4790a56622343bc02"
+SRC_URI[md5sum] = "8f9b2b2e049d59b1b86ce9657802a353"
+SRC_URI[sha256sum] = "e8bdf80bd6a5f3fc7df53245dfc0a678803d4f19c1c7ba2af3f98c8249e612b0"
S = "${WORKDIR}/binutils-linaro-${BPV}-${RELEASE}"
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch
new file mode 100644
index 00000000..f786b176
--- /dev/null
+++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch
@@ -0,0 +1,31 @@
+Upstream-Status: Backport
+
+From 0a09fb4a09e80c36fa3ef763ae276fd13d272a36 Mon Sep 17 00:00:00 2001
+From: Hans-Peter Nilsson <hp@bitrange.com>
+Date: Sat, 1 Feb 2014 01:11:28 +0100
+Subject: [PATCH] Fix MMIX build breakage from bfd_set_section_vma change.
+
+ * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Fix typo in
+ call to bfd_set_section_vma exposed by recent bfd_set_section_vma
+ change.
+---
+ ld/ChangeLog | 6 ++++++
+ ld/emultempl/mmix-elfnmmo.em | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em
+index 0059792..5e9781a 100644
+--- a/ld/emultempl/mmix-elfnmmo.em
++++ b/ld/emultempl/mmix-elfnmmo.em
+@@ -102,7 +102,7 @@ mmix_after_allocation (void)
+ This section is only present when there are register symbols. */
+ sec = bfd_get_section_by_name (link_info.output_bfd, MMIX_REG_SECTION_NAME);
+ if (sec != NULL)
+- bfd_set_section_vma (abfd, sec, 0);
++ bfd_set_section_vma (sec->owner, sec, 0);
+
+ if (!_bfd_mmix_after_linker_allocation (link_info.output_bfd, &link_info))
+ {
+--
+1.7.10.4
+
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uninitialised-warning.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uninitialised-warning.patch
new file mode 100644
index 00000000..2feb80c4
--- /dev/null
+++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/binutils-uninitialised-warning.patch
@@ -0,0 +1,50 @@
+From f9c316c4d75be236bbaa8464ef803ed2d3859d6d Mon Sep 17 00:00:00 2001
+From: H.J. Lu <hjl.tools@gmail.com>
+Date: Wed, 15 Jan 2014 07:43:19 -0800
+Subject: [PATCH 1/1] Silence uninitialized warning on ehdr_start_save
+
+Older GCC, like 4.1/4.2, will issue an uninitialized warning on
+ehdr_start_save. This patch silences by using
+
+struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
+ Silence uninitialized warning on ehdr_start_save with older
+ GCC.
+
+Upstream-Status: Backport
+---
+ ld/ChangeLog | 6 ++++++
+ ld/emultempl/elf32.em | 2 +-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+#diff --git a/ld/ChangeLog b/ld/ChangeLog
+#index eaa6b93..91055de 100644
+#--- a/ld/ChangeLog
+#+++ b/ld/ChangeLog
+#@@ -1,3 +1,9 @@
+#+2014-01-15 H.J. Lu <hongjiu.lu@intel.com>
+#+
+#+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
+#+ Silence uninitialized warning on ehdr_start_save with older
+#+ GCC.
+#+
+# 2014-01-15 Alan Modra <amodra@gmail.com>
+#
+# * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Define
+diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
+index 13f86f0..569c7f7 100644
+--- a/ld/emultempl/elf32.em
++++ b/ld/emultempl/elf32.em
+@@ -1481,7 +1481,7 @@ gld${EMULATION_NAME}_before_allocation (void)
+ asection *sinterp;
+ bfd *abfd;
+ struct elf_link_hash_entry *ehdr_start = NULL;
+- struct bfd_link_hash_entry ehdr_start_save;
++ struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
+
+ if (is_elf_hash_table (link_info.hash))
+ {
+--
+1.7.1
+
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr16428.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr16428.patch
new file mode 100644
index 00000000..4584748b
--- /dev/null
+++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr16428.patch
@@ -0,0 +1,123 @@
+commit 4199e3b8669d0a36448687850374fdc2ad7240b6
+Author: Alan Modra <amodra@gmail.com>
+Date: Wed Jan 15 21:50:55 2014 +1030
+
+ non-PIC references to __ehdr_start in pie and shared
+
+ Rather than hacking every backend to not discard dynamic relocations
+ against an undefined hidden __ehdr_start, make it appear to be defined
+ early. We want __ehdr_start hidden before size_dynamic_sections so
+ that it isn't put in .dynsym, but we do need the dynamic relocations
+ for a PIE or shared library with a non-PIC reference. Defining it
+ early is wrong if we don't actually define the symbol later to its
+ proper value. (In some cases we want to leave the symbol undefined,
+ for example, when the ELF header isn't loaded, and we don't have this
+ infomation available in before_allocation.)
+
+ ld/
+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Define
+ __ehdr_start before size_dynamic_sections and restore afterwards.
+ ld/testsuite/
+ * ld-elf/ehdr_start-shared.d: New.
+ * ld-elf/ehdr_start-userdef.d: xfail frv.
+ * ld-elf/ehdr_start-weak.d: Likewise.
+ * ld-elf/ehdr_start.d: Likewise.
+
+Upstream-Status: Backport
+
+diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
+index 9a2fe89..13f86f0 100644
+--- a/ld/emultempl/elf32.em
++++ b/ld/emultempl/elf32.em
+@@ -1480,6 +1480,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+ const char *rpath;
+ asection *sinterp;
+ bfd *abfd;
++ struct elf_link_hash_entry *ehdr_start = NULL;
++ struct bfd_link_hash_entry ehdr_start_save;
+
+ if (is_elf_hash_table (link_info.hash))
+ {
+@@ -1504,6 +1506,16 @@ gld${EMULATION_NAME}_before_allocation (void)
+ _bfd_elf_link_hash_hide_symbol (&link_info, h, TRUE);
+ if (ELF_ST_VISIBILITY (h->other) != STV_INTERNAL)
+ h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN;
++ /* Don't leave the symbol undefined. Undefined hidden
++ symbols typically won't have dynamic relocations, but
++ we most likely will need dynamic relocations for
++ __ehdr_start if we are building a PIE or shared
++ library. */
++ ehdr_start = h;
++ ehdr_start_save = h->root;
++ h->root.type = bfd_link_hash_defined;
++ h->root.u.def.section = bfd_abs_section_ptr;
++ h->root.u.def.value = 0;
+ }
+ }
+
+@@ -1620,6 +1632,14 @@ ${ELF_INTERPRETER_SET_DEFAULT}
+
+ if (!bfd_elf_size_dynsym_hash_dynstr (link_info.output_bfd, &link_info))
+ einfo ("%P%F: failed to set dynamic section sizes: %E\n");
++
++ if (ehdr_start != NULL)
++ {
++ /* If we twiddled __ehdr_start to defined earlier, put it back
++ as it was. */
++ ehdr_start->root.type = ehdr_start_save.type;
++ ehdr_start->root.u = ehdr_start_save.u;
++ }
+ }
+
+ EOF
+diff --git a/ld/testsuite/ld-elf/ehdr_start-shared.d b/ld/testsuite/ld-elf/ehdr_start-shared.d
+new file mode 100644
+index 0000000..c17516a
+--- /dev/null
++++ b/ld/testsuite/ld-elf/ehdr_start-shared.d
+@@ -0,0 +1,9 @@
++#source: ehdr_start.s
++#ld: -e _start -shared
++#nm: -n
++#target: *-*-linux* *-*-gnu* *-*-nacl*
++#xfail: cris*-*-* frv-*-*
++
++#...
++[0-9a-f]*000 [Adrt] __ehdr_start
++#pass
+diff --git a/ld/testsuite/ld-elf/ehdr_start-userdef.d b/ld/testsuite/ld-elf/ehdr_start-userdef.d
+index 2a88e98..b58ae3f 100644
+--- a/ld/testsuite/ld-elf/ehdr_start-userdef.d
++++ b/ld/testsuite/ld-elf/ehdr_start-userdef.d
+@@ -2,6 +2,7 @@
+ #ld: -e _start -T ehdr_start-userdef.t
+ #readelf: -Ws
+ #target: *-*-linux* *-*-gnu* *-*-nacl*
++#xfail: frv-*-*
+
+ #...
+ Symbol table '\.symtab' contains [0-9]+ entries:
+diff --git a/ld/testsuite/ld-elf/ehdr_start-weak.d b/ld/testsuite/ld-elf/ehdr_start-weak.d
+index 8bd9035..24ae34c 100644
+--- a/ld/testsuite/ld-elf/ehdr_start-weak.d
++++ b/ld/testsuite/ld-elf/ehdr_start-weak.d
+@@ -2,6 +2,7 @@
+ #ld: -e _start -T ehdr_start-missing.t
+ #nm: -n
+ #target: *-*-linux* *-*-gnu* *-*-nacl*
++#xfail: frv-*-*
+
+ #...
+ \s+[wU] __ehdr_start
+diff --git a/ld/testsuite/ld-elf/ehdr_start.d b/ld/testsuite/ld-elf/ehdr_start.d
+index 52e5b54..d538b66 100644
+--- a/ld/testsuite/ld-elf/ehdr_start.d
++++ b/ld/testsuite/ld-elf/ehdr_start.d
+@@ -2,6 +2,7 @@
+ #ld: -e _start
+ #nm: -n
+ #target: *-*-linux* *-*-gnu* *-*-nacl*
++#xfail: frv-*-*
+
+ #...
+ [0-9a-f]*000 [Adrt] __ehdr_start
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/replace_macros_with_static_inline.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/replace_macros_with_static_inline.patch
new file mode 100644
index 00000000..834f55cf
--- /dev/null
+++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/replace_macros_with_static_inline.patch
@@ -0,0 +1,188 @@
+Upstream-Status: Backport
+
+From 27b829ee701e29804216b3803fbaeb629be27491 Mon Sep 17 00:00:00 2001
+From: Nick Clifton <nickc@redhat.com>
+Date: Wed, 29 Jan 2014 13:46:39 +0000
+Subject: [PATCH 1/1] Following up on Tom's suggestion I am checking in a patch to replace the various
+ bfd_xxx_set macros with static inline functions, so that we can avoid compile time
+ warnings about comma expressions with unused values.
+
+ * bfd-in.h (bfd_set_section_vma): Delete.
+ (bfd_set_section_alignment): Delete.
+ (bfd_set_section_userdata): Delete.
+ (bfd_set_cacheable): Delete.
+ * bfd.c (bfd_set_cacheable): New static inline function.
+ * section.c (bfd_set_section_userdata): Likewise.
+ (bfd_set_section_vma): Likewise.
+ (bfd_set_section_alignment): Likewise.
+ * bfd-in2.h: Regenerate.
+---
+ bfd/ChangeLog | 12 ++++++++++++
+ bfd/bfd-in.h | 5 -----
+ bfd/bfd-in2.h | 41 +++++++++++++++++++++++++++++++++++------
+ bfd/bfd.c | 8 ++++++++
+ bfd/section.c | 26 ++++++++++++++++++++++++++
+ 5 files changed, 81 insertions(+), 11 deletions(-)
+
+diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
+index 3afd71b..c7c5a7d 100644
+--- a/bfd/bfd-in.h
++++ b/bfd/bfd-in.h
+@@ -292,9 +292,6 @@ typedef struct bfd_section *sec_ptr;
+
+ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
+
+-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
+-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
+-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
+ /* Find the address one past the end of SEC. */
+ #define bfd_get_section_limit(bfd, sec) \
+ (((bfd)->direction != write_direction && (sec)->rawsize != 0 \
+@@ -517,8 +514,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *);
+
+ #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
+
+-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
+-
+ extern bfd_boolean bfd_cache_close
+ (bfd *abfd);
+ /* NB: This declaration should match the autogenerated one in libbfd.h. */
+diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
+index 71996db..b5aeb40 100644
+--- a/bfd/bfd-in2.h
++++ b/bfd/bfd-in2.h
+@@ -299,9 +299,6 @@ typedef struct bfd_section *sec_ptr;
+
+ #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
+
+-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
+-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
+-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
+ /* Find the address one past the end of SEC. */
+ #define bfd_get_section_limit(bfd, sec) \
+ (((bfd)->direction != write_direction && (sec)->rawsize != 0 \
+@@ -524,8 +521,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *);
+
+ #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
+
+-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
+-
+ extern bfd_boolean bfd_cache_close
+ (bfd *abfd);
+ /* NB: This declaration should match the autogenerated one in libbfd.h. */
+@@ -1029,7 +1024,7 @@ bfd *bfd_openr (const char *filename, const char *target);
+
+ bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
+
+-bfd *bfd_openstreamr (const char *, const char *, void *);
++bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
+
+ bfd *bfd_openr_iovec (const char *filename, const char *target,
+ void *(*open_func) (struct bfd *nbfd,
+@@ -1596,6 +1591,32 @@ struct relax_table {
+ int size;
+ };
+
++/* Note: the following are provided as inline functions rather than macros
++ because not all callers use the return value. A macro implementation
++ would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
++ compilers will complain about comma expressions that have no effect. */
++static inline bfd_boolean
++bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
++{
++ ptr->userdata = val;
++ return TRUE;
++}
++
++static inline bfd_boolean
++bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
++{
++ ptr->vma = ptr->lma = val;
++ ptr->user_set_vma = TRUE;
++ return TRUE;
++}
++
++static inline bfd_boolean
++bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
++{
++ ptr->alignment_power = val;
++ return TRUE;
++}
++
+ /* These sections are global, and are managed by BFD. The application
+ and target back end are not permitted to change the values in
+ these sections. */
+@@ -6415,6 +6436,14 @@ struct bfd
+ unsigned int selective_search : 1;
+ };
+
++/* See note beside bfd_set_section_userdata. */
++static inline bfd_boolean
++bfd_set_cacheable (bfd * abfd, bfd_boolean val)
++{
++ abfd->cacheable = val;
++ return TRUE;
++}
++
+ typedef enum bfd_error
+ {
+ bfd_error_no_error = 0,
+diff --git a/bfd/bfd.c b/bfd/bfd.c
+index 8d0580c..2d174f3 100644
+--- a/bfd/bfd.c
++++ b/bfd/bfd.c
+@@ -311,6 +311,14 @@ CODE_FRAGMENT
+ . unsigned int selective_search : 1;
+ .};
+ .
++.{* See note beside bfd_set_section_userdata. *}
++.static inline bfd_boolean
++.bfd_set_cacheable (bfd * abfd, bfd_boolean val)
++.{
++. abfd->cacheable = val;
++. return TRUE;
++.}
++.
+ */
+
+ #include "sysdep.h"
+diff --git a/bfd/section.c b/bfd/section.c
+index fb19d8c..a661228 100644
+--- a/bfd/section.c
++++ b/bfd/section.c
+@@ -542,6 +542,32 @@ CODE_FRAGMENT
+ . int size;
+ .};
+ .
++.{* Note: the following are provided as inline functions rather than macros
++. because not all callers use the return value. A macro implementation
++. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
++. compilers will complain about comma expressions that have no effect. *}
++.static inline bfd_boolean
++.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
++.{
++. ptr->userdata = val;
++. return TRUE;
++.}
++.
++.static inline bfd_boolean
++.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
++.{
++. ptr->vma = ptr->lma = val;
++. ptr->user_set_vma = TRUE;
++. return TRUE;
++.}
++.
++.static inline bfd_boolean
++.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
++.{
++. ptr->alignment_power = val;
++. return TRUE;
++.}
++.
+ .{* These sections are global, and are managed by BFD. The application
+ . and target back end are not permitted to change the values in
+ . these sections. *}
+--
+1.7.1
+