From 977dc1ac484e0c201b30f551e5f2d1d32e27eccf Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Wed, 6 Feb 2019 16:01:43 -0500 Subject: poky: refresh thud: 1d987b98ed..ee7dd31944 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update poky to thud HEAD. Alex Kiernan (2): systemd: backport fix to stop enabling ECN systemd: Add PACKAGECONFIG for gnutls Alexander Kanavin (3): lighttpd: update to 1.4.51 boost: update to 1.69.0 systemd: backport a patch to fix meson 0.49.0 issue Alexey Brodkin (1): wic: sdimage-bootpart: Use mmcblk0 drive instead of bogus mmcblk André Draszik (1): meta: remove True option to getVar calls (again) Anuj Mittal (6): eudev: upgrade 3.2.5 -> 3.2.7 gsettings-desktop-schemas: upgrade 3.28.0 -> 3.28.1 libatomic-ops: upgrade 7.6.6 -> 7.6.8 libpng: upgrade 1.6.35 -> 1.6.36 common-licenses: update Libpng license text i2c-tools: upgrade 4.0 -> 4.1 Aníbal Limón (1): meta/classes/testimage.bbclass: Only validate IMAGE_FSTYPES when is QEMU Armin Kuster (1): tzdata/tzcode-native: update to 2018i Brad Bishop (1): systemd-systemctl-native: handle Install wildcards Bruce Ashfield (3): kernel: use olddefconfig as the primary target for KERNEL_CONFIG_COMMAND linux-yocto/4.18: update to v4.18.22 linux-yocto/4.18: update to v4.18.25 Changqing Li (1): libsndfile1: Security fix CVE-2017-17456/17457 CVE-2018-19661/19662 Chen Qi (3): package.bbclass: fix python unclosed file ResourceWarning eSDK.py: avoid error in tearDownClass due to race condistion eSDK.py: unset BBPATH and BUILDDIR to avoid eSDK failure Douglas Royds (6): icecc: readlink -f on the recipe-sysroot gcc/g++ icecc: Trivial simplification icecc: Syntax error meant that we weren't waiting for tarball generation icecc: Don't generate recipe-sysroot symlinks at recipe-parsing time icecc: patchelf is needed by icecc-create-env patch: reproducibility: Fix host umask leakage Erik Botö (1): testimage: Add possibility to pass parmeters to qemu Federico Sauter (1): kernel: don't assign the build user/host Joshua Watt (1): classes/testsdk: Split implementation into classes Kai Kang (2): testimage.bbclass: remove boot parameter systemd.log_target systemd: fix compile error for x32 Kevin Hao (1): meta-yocto-bsp: Bump to the latest stable kernel for the non-x86 BSPs Khem Raj (6): grub2: Fix passing null to printf formats gnupg: Upgrade to 2.2.12 release binutils: Fix build with clang binutils: Upgrade to latest on 2.31 release branch binutils: bfd doesn't handle ELF compressed data alignment systemd: Fix memory use after free errors Manjukumar Matha (1): kernel.bbclass: Fix incorrect deploying of fitimage.initramfs Marcus Cooper (3): systemd: Security fix CVE-2018-16864 systemd: Security fix CVE-2018-16865 systemd: Security fix CVE-2018-16866 Michael Ho (1): sstate: add support for caching shared workdir tasks Naveen Saini (2): linux-yocto: update genericx86* SRCREV for 4.18 linux-yocto: update genericx86* SRCREV for 4.18 Peter Kjellerstedt (2): systemd: Correct and clean up user/group definitions systemd: Correct a conditional add to SYSTEMD_PACKAGES Richard Purdie (9): nativesdk-*-provides-dummy: Fixes to allow correct operation with opkg classes: Correctly markup regex strings testimage: Remove duplicate dependencies testimage: Simplfy DEFAULT_TEST_SUITES logic testimage: Further cleanup DEFAULT_TEST_SUITES testimage: Enable autorunning of the package manager testsuites oeqa/runtime/cases: Improve test dependency information oeqa/runtime/cases: Improve dependencies of kernel/gcc/build tests oeqa/utils/buildproject: Only clean files if we've done something Robert Yang (7): oeqa/utils/qemurunner: Print output when failed to login oeqa/utils/qemurunner: set timeout to 60s for run_serial oeqa: Fix for QEMU_USE_KVM oeqa: make it work for multiple users runqemu-gen-tapdevs: Allow run --help without sudo oeqa/manual/bsp-qemu.json: Update for QEMU_USE_KVM oeqa/selftest/runqemu: Enable kvm when QEMU_USE_KVM is set Ross Burton (2): toolchain-scripts: run post-relocate scripts for every environment runqemu: clean up subprocess usage Yeoh Ee Peng (3): scripts/oe-git-archive: fix non-existent key referencing error testimage: Add support for slirp oeqa/qemu & runtime: qemu do not need ip input from external OpenBMC compatibility updates: meta-phosphor: Brad Bishop (1): phosphor: rebase i2c-tools patches Change-Id: Idc626fc076580aeebde1420bcad01e069b559504 Signed-off-by: Brad Bishop --- .../recipes-devtools/binutils/binutils-2.31.inc | 11 +- ...check-for-input-file-matching-output-file.patch | 59 ---- ...location-where-GOT-information-is-collect.patch | 201 ------------- ...bustness.-Return-FALSE-in-case-of-NULL-po.patch | 38 --- ...lobal-symbol-is-not-an-indirect-or-warnin.patch | 46 --- ...tion-was-still-being-generated-when-symbo.patch | 40 --- ...compressed-header-alignment-correctly-by-.patch | 332 +++++++++++++++++++++ ...ignment-of-uncompressed-section-from-ch_a.patch | 200 +++++++++++++ .../binutils/binutils/CVE-2018-17358.patch | 37 +-- .../binutils/binutils/CVE-2018-17360.patch | 24 +- .../binutils/binutils/CVE-2018-18309.patch | 87 +----- .../binutils/binutils/CVE-2018-18605.patch | 20 +- .../binutils/binutils/CVE-2018-18606.patch | 22 +- .../binutils/binutils/CVE-2018-18607.patch | 25 +- .../binutils/binutils/clang-bfd-fix.patch | 30 ++ ...s-eeprog-Module.mk-Add-missing-dependency.patch | 32 -- ...01-lib-Module.mk-Add-missing-dependencies.patch | 37 --- ...-tools-Module.mk-Add-missing-dependencies.patch | 66 ---- .../i2c-tools/files/remove-i2c-dev.patch | 98 ------ .../recipes-devtools/i2c-tools/i2c-tools_4.0.bb | 45 --- .../recipes-devtools/i2c-tools/i2c-tools_4.1.bb | 41 +++ .../python/python-native_2.7.15.bb | 2 +- .../python/python3-native_3.5.6.bb | 2 +- poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb | 6 +- 24 files changed, 641 insertions(+), 860 deletions(-) delete mode 100644 poky/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch delete mode 100644 poky/meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch delete mode 100644 poky/meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch delete mode 100644 poky/meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch delete mode 100644 poky/meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch create mode 100644 poky/meta/recipes-devtools/binutils/binutils/0022-Handle-ELF-compressed-header-alignment-correctly-by-.patch create mode 100644 poky/meta/recipes-devtools/binutils/binutils/0023-gold-Get-alignment-of-uncompressed-section-from-ch_a.patch create mode 100644 poky/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch delete mode 100644 poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch delete mode 100644 poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch delete mode 100644 poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch delete mode 100644 poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch delete mode 100644 poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb create mode 100644 poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb (limited to 'poky/meta/recipes-devtools') diff --git a/poky/meta/recipes-devtools/binutils/binutils-2.31.inc b/poky/meta/recipes-devtools/binutils/binutils-2.31.inc index 0c9d4cef2..62acec500 100644 --- a/poky/meta/recipes-devtools/binutils/binutils-2.31.inc +++ b/poky/meta/recipes-devtools/binutils/binutils-2.31.inc @@ -15,10 +15,11 @@ def binutils_branch_version(d): return pvsplit[0] + "_" + pvsplit[1] BINUPV = "${@binutils_branch_version(d)}" +PV .= ".1" UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P\d+_(\d_?)*)" -SRCREV ?= "4568e49ff799192fea4f66063fe13e2b871ec75a" +SRCREV ?= "c909e7afdc4710851a53e86ebed8cea3879b26e5" BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git" SRC_URI = "\ ${BINUTILS_GIT_URI} \ @@ -36,11 +37,9 @@ SRC_URI = "\ file://0014-Detect-64-bit-MIPS-targets.patch \ file://0015-sync-with-OE-libtool-changes.patch \ file://0016-add-i386pep-emulation-for-x86_64.patch \ - file://0017-improve-check-for-input-file-matching-output-file.patch \ - file://0018-Refactored-location-where-GOT-information-is-collect.patch \ - file://0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch \ - file://0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch \ - file://0021-PLT-information-was-still-being-generated-when-symbo.patch \ + file://0022-Handle-ELF-compressed-header-alignment-correctly-by-.patch \ + file://0023-gold-Get-alignment-of-uncompressed-section-from-ch_a.patch \ + file://clang-bfd-fix.patch \ file://CVE-2018-17358.patch \ file://CVE-2018-17360.patch \ file://CVE-2018-18309.patch \ diff --git a/poky/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch b/poky/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch deleted file mode 100644 index 265e52633..000000000 --- a/poky/meta/recipes-devtools/binutils/binutils/0017-improve-check-for-input-file-matching-output-file.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 2a50366ded329bfb39d387253450c9d5302c3503 Mon Sep 17 00:00:00 2001 -From: Robert Yang -Date: Tue, 14 Aug 2018 12:22:35 +0100 -Subject: [PATCH] as.c: Improve check for input file matching output file. - -When the assembler reports that the input and output are the same, report the -file names involved, in order to help debugging. Also do not equate two files -are the same if the have the same inode value but reside on different file -systems. - -Upstream-Status: Backport - -Signed-off-by: Robert Yang ---- - gas/as.c | 27 ++++++++++++++++++++------- - 2 files changed, 20 insertions(+), 7 deletions(-) - -diff --git a/gas/as.c b/gas/as.c -index b2a908a..3105d06 100644 ---- a/gas/as.c -+++ b/gas/as.c -@@ -1259,14 +1259,27 @@ main (int argc, char ** argv) - { - struct stat sib; - -- if (stat (argv[i], &sib) == 0) -+ /* Check that the input file and output file are different. */ -+ if (stat (argv[i], &sib) == 0 -+ && sib.st_ino == sob.st_ino -+ /* POSIX emulating systems may support stat() but if the -+ underlying file system does not support a file serial number -+ of some kind then they will return 0 for the inode. So -+ two files with an inode of 0 may not actually be the same. -+ On real POSIX systems no ordinary file will ever have an -+ inode of 0. */ -+ && sib.st_ino != 0 -+ /* Different files may have the same inode number if they -+ reside on different devices, so check the st_dev field as -+ well. */ -+ && sib.st_dev == sob.st_dev) - { -- if (sib.st_ino == sob.st_ino && sib.st_ino != 0) -- { -- /* Don't let as_fatal remove the output file! */ -- out_file_name = NULL; -- as_fatal (_("The input and output files must be distinct")); -- } -+ const char *saved_out_file_name = out_file_name; -+ -+ /* Don't let as_fatal remove the output file! */ -+ out_file_name = NULL; -+ as_fatal (_("The input '%s' and output '%s' files are the same"), -+ argv[i], saved_out_file_name); - } - } - } --- -2.7.4 - diff --git a/poky/meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch b/poky/meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch deleted file mode 100644 index d41339a9a..000000000 --- a/poky/meta/recipes-devtools/binutils/binutils/0018-Refactored-location-where-GOT-information-is-collect.patch +++ /dev/null @@ -1,201 +0,0 @@ -From d930affa2d475d1cc6792f1e6d56bef3d6c617db Mon Sep 17 00:00:00 2001 -From: Cupertino Miranda -Date: Fri, 2 Mar 2018 17:16:21 +0100 -Subject: [PATCH] Refactored location where GOT information is collected. - -Change location where GOT information is collected for ARC target, avoiding -posible use conflicts of the previous .got field in the symbols hash_entry. - -bfd/ -2018-03-01 Cupertino Miranda - - * arc-got.h (get_got_entry_list_for_symbol): Changed. - * ef32-arc.c (struct elf_arc_link_hash_entry): Moved and changed. - (elf_arc_link_hash_newfunc): Changed. - (arc_elf_link_hash_table_create): Removed old initializations. - (elf_arc_relocate_section, elf_arc_finish_dynamic_symbol): Changed. - -Signed-off-by: Cupertino Miranda -Signed-off-by: Alexey Brodkin -[Romain: rebase on top of 2.31] -Signed-off-by: Romain Naour - -Upstream-Status: Pending ---- - bfd/arc-got.h | 6 +++-- - bfd/elf32-arc.c | 77 +++++++++++++++++++++++++++++++-------------------------- - 2 files changed, 46 insertions(+), 37 deletions(-) - -diff --git a/bfd/arc-got.h b/bfd/arc-got.h -index a86061bcb38..81ce88fe21a 100644 ---- a/bfd/arc-got.h -+++ b/bfd/arc-got.h -@@ -156,9 +156,11 @@ get_got_entry_list_for_symbol (bfd *abfd, - unsigned long r_symndx, - struct elf_link_hash_entry *h) - { -- if (h != NULL) -+ struct elf_arc_link_hash_entry *h1 = -+ ((struct elf_arc_link_hash_entry *) h); -+ if (h1 != NULL) - { -- return &h->got.glist; -+ return &h1->got_ents; - } - else - { -diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c -index a48ef0ca15f..ab84de43815 100644 ---- a/bfd/elf32-arc.c -+++ b/bfd/elf32-arc.c -@@ -160,6 +160,18 @@ struct arc_relocation_data - const char * symbol_name; - }; - -+/* ARC ELF linker hash entry. */ -+struct elf_arc_link_hash_entry -+{ -+ struct elf_link_hash_entry root; -+ -+ /* Track dynamic relocs copied for this symbol. */ -+ struct elf_dyn_relocs *dyn_relocs; -+ -+ struct got_entry *got_ents; -+}; -+ -+ - /* Should be included at this location due to static declarations - defined before this point. */ - #include "arc-got.h" -@@ -281,15 +293,6 @@ struct arc_reloc_map - unsigned char elf_reloc_val; - }; - --/* ARC ELF linker hash entry. */ --struct elf_arc_link_hash_entry --{ -- struct elf_link_hash_entry root; -- -- /* Track dynamic relocs copied for this symbol. */ -- struct elf_dyn_relocs *dyn_relocs; --}; -- - /* ARC ELF linker hash table. */ - struct elf_arc_link_hash_table - { -@@ -301,28 +304,28 @@ elf_arc_link_hash_newfunc (struct bfd_hash_entry *entry, - struct bfd_hash_table *table, - const char *string) - { -+ struct elf_arc_link_hash_entry * ret = -+ (struct elf_arc_link_hash_entry *) entry; -+ - /* Allocate the structure if it has not already been allocated by a - subclass. */ -- if (entry == NULL) -- { -- entry = (struct bfd_hash_entry *) -- bfd_hash_allocate (table, -- sizeof (struct elf_arc_link_hash_entry)); -- if (entry == NULL) -- return entry; -- } -+ if (ret == NULL) -+ ret = (struct elf_arc_link_hash_entry *) -+ bfd_hash_allocate (table, sizeof (struct elf_arc_link_hash_entry)); -+ if (ret == NULL) -+ return (struct bfd_hash_entry *) ret; - - /* Call the allocation method of the superclass. */ -- entry = _bfd_elf_link_hash_newfunc (entry, table, string); -- if (entry != NULL) -+ ret = ((struct elf_arc_link_hash_entry *) -+ _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *) ret, -+ table, string)); -+ if (ret != NULL) - { -- struct elf_arc_link_hash_entry *eh; -- -- eh = (struct elf_arc_link_hash_entry *) entry; -- eh->dyn_relocs = NULL; -+ ret->dyn_relocs = NULL; -+ ret->got_ents = NULL; - } - -- return entry; -+ return (struct bfd_hash_entry *) ret; - } - - /* Destroy an ARC ELF linker hash table. */ -@@ -352,11 +355,6 @@ arc_elf_link_hash_table_create (bfd *abfd) - return NULL; - } - -- ret->elf.init_got_refcount.refcount = 0; -- ret->elf.init_got_refcount.glist = NULL; -- ret->elf.init_got_offset.offset = 0; -- ret->elf.init_got_offset.glist = NULL; -- - ret->elf.root.hash_table_free = elf_arc_link_hash_table_free; - - return &ret->elf.root; -@@ -1615,10 +1613,14 @@ elf_arc_relocate_section (bfd * output_bfd, - while (h->root.type == bfd_link_hash_indirect - || h->root.type == bfd_link_hash_warning) - { -- struct elf_link_hash_entry *h_old = h; -+ struct elf_arc_link_hash_entry *ah_old = -+ (struct elf_arc_link_hash_entry *) h; - h = (struct elf_link_hash_entry *) h->root.u.i.link; -- if (h->got.glist == 0 && h_old->got.glist != h->got.glist) -- h->got.glist = h_old->got.glist; -+ struct elf_arc_link_hash_entry *ah = -+ (struct elf_arc_link_hash_entry *) h; -+ -+ if (ah->got_ents == 0 && ah_old->got_ents != ah->got_ents) -+ ah->got_ents = ah_old->got_ents; - } - - /* TODO: Need to validate what was the intention. */ -@@ -1636,6 +1638,8 @@ elf_arc_relocate_section (bfd * output_bfd, - - if (is_reloc_for_GOT (howto) && !bfd_link_pic (info)) - { -+ struct elf_arc_link_hash_entry *ah = -+ (struct elf_arc_link_hash_entry *) h; - /* TODO: Change it to use arc_do_relocation with - ARC_32 reloc. Try to use ADD_RELA macro. */ - bfd_vma relocation = -@@ -1645,8 +1649,8 @@ elf_arc_relocate_section (bfd * output_bfd, - + reloc_data.sym_section->output_section->vma) - : 0); - -- BFD_ASSERT (h->got.glist); -- bfd_vma got_offset = h->got.glist->offset; -+ BFD_ASSERT (ah->got_ents); -+ bfd_vma got_offset = ah->got_ents->offset; - bfd_put_32 (output_bfd, relocation, - htab->sgot->contents + got_offset); - } -@@ -1958,6 +1962,7 @@ elf_arc_check_relocs (bfd * abfd, - else /* Global one. */ - h = sym_hashes[r_symndx - symtab_hdr->sh_info]; - -+ - switch (r_type) - { - case R_ARC_32: -@@ -2404,7 +2409,9 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd, - create respective dynamic relocs. */ - /* TODO: Make function to get list and not access the list directly. */ - /* TODO: Move function to relocate_section create this relocs eagerly. */ -- create_got_dynrelocs_for_got_info (&h->got.glist, -+ struct elf_arc_link_hash_entry *ah = -+ (struct elf_arc_link_hash_entry *) h; -+ create_got_dynrelocs_for_got_info (&ah->got_ents, - output_bfd, - info, - h); --- -2.14.4 - diff --git a/poky/meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch b/poky/meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch deleted file mode 100644 index 6a58ee06a..000000000 --- a/poky/meta/recipes-devtools/binutils/binutils/0019-Improved-robustness.-Return-FALSE-in-case-of-NULL-po.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 955176bd999fe80c5b937ab8786665079e35c387 Mon Sep 17 00:00:00 2001 -From: Cupertino Miranda -Date: Fri, 2 Mar 2018 17:33:48 +0100 -Subject: [PATCH] Improved robustness. Return FALSE in case of NULL pointer. - -bfd/ -2018-03-01 Cupertino Miranda - - * elf32-arc.c (elf_arc_finish_dynamic_symbol) Return FALSE in case - arc_htab is NULL. - -Signed-off-by: Cupertino Miranda -Signed-off-by: Alexey Brodkin -[Romain: rebase on top of 2.31] -Signed-off-by: Romain Naour - -Upstream-Status: Pending ---- - bfd/elf32-arc.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c -index ab84de43815..33fc72cff6e 100644 ---- a/bfd/elf32-arc.c -+++ b/bfd/elf32-arc.c -@@ -2420,6 +2420,9 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd, - { - struct elf_arc_link_hash_table *arc_htab = elf_arc_hash_table (info); - -+ if(arc_htab == NULL) -+ return FALSE; -+ - if (h->dynindx == -1 - || (h->root.type != bfd_link_hash_defined - && h->root.type != bfd_link_hash_defweak) --- -2.14.4 - diff --git a/poky/meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch b/poky/meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch deleted file mode 100644 index 01e42c03b..000000000 --- a/poky/meta/recipes-devtools/binutils/binutils/0020-Make-sure-global-symbol-is-not-an-indirect-or-warnin.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 9d09ce14b4eef2b56f24660fd69a44acd45128b2 Mon Sep 17 00:00:00 2001 -From: Cupertino Miranda -Date: Fri, 2 Mar 2018 17:38:14 +0100 -Subject: [PATCH] Make sure global symbol is not an indirect or warning. - -Problem identified in the context of glibc with latest upstream binutils. -Dynamic symbol space was being reserved but, no actual information for the -symbol was being set. Data for the symbol was kept initialized with -1. -No easy test case was possible to be created. - -bfd/ -2018-03-01 Cupertino Miranda - - * elf32-arc.c (elf_arc_check_relocs): Changed. - -Signed-off-by: Cupertino Miranda -Signed-off-by: Alexey Brodkin -[Romain: rebase on top of 2.31] -Signed-off-by: Romain Naour - -Upstream-Status: Pending ---- - bfd/elf32-arc.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c -index 33fc72cff6e..9b72c5b4f4f 100644 ---- a/bfd/elf32-arc.c -+++ b/bfd/elf32-arc.c -@@ -1960,7 +1960,12 @@ elf_arc_check_relocs (bfd * abfd, - if (r_symndx < symtab_hdr->sh_info) /* Is a local symbol. */ - h = NULL; - else /* Global one. */ -- h = sym_hashes[r_symndx - symtab_hdr->sh_info]; -+ { -+ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; -+ while (h->root.type == bfd_link_hash_indirect -+ || h->root.type == bfd_link_hash_warning) -+ h = (struct elf_link_hash_entry *) h->root.u.i.link; -+ } - - - switch (r_type) --- -2.14.4 - diff --git a/poky/meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch b/poky/meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch deleted file mode 100644 index 9e942399c..000000000 --- a/poky/meta/recipes-devtools/binutils/binutils/0021-PLT-information-was-still-being-generated-when-symbo.patch +++ /dev/null @@ -1,40 +0,0 @@ -From e4861c68067cb2166b4c2bb9c052abeb6ad9aaa1 Mon Sep 17 00:00:00 2001 -From: Cupertino Miranda -Date: Fri, 2 Mar 2018 17:44:29 +0100 -Subject: [PATCH] PLT information was still being generated when symbol was - forced_local. - -A change upstream reveiled this issue, triggering an assert when linking glibc. - -bfd/ -2018-03-01 Cupertino Miranda - - * elf32-arc.c (elf_arc_check_relocs): Changed. - -Signed-off-by: Cupertino Miranda -Signed-off-by: Alexey Brodkin -[Romain: rebase on top of 2.31] -Signed-off-by: Romain Naour - -Upstream-Status: Pending ---- - bfd/elf32-arc.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c -index 9b72c5b4f4f..b40b463d34d 100644 ---- a/bfd/elf32-arc.c -+++ b/bfd/elf32-arc.c -@@ -2041,7 +2041,8 @@ elf_arc_check_relocs (bfd * abfd, - if (h == NULL) - continue; - else -- h->needs_plt = 1; -+ if(h->forced_local == 0) -+ h->needs_plt = 1; - } - - /* Add info to the symbol got_entry_list. */ --- -2.14.4 - diff --git a/poky/meta/recipes-devtools/binutils/binutils/0022-Handle-ELF-compressed-header-alignment-correctly-by-.patch b/poky/meta/recipes-devtools/binutils/binutils/0022-Handle-ELF-compressed-header-alignment-correctly-by-.patch new file mode 100644 index 000000000..650de9b9a --- /dev/null +++ b/poky/meta/recipes-devtools/binutils/binutils/0022-Handle-ELF-compressed-header-alignment-correctly-by-.patch @@ -0,0 +1,332 @@ +From bb9c8cc3c5f4ffd6019a8c53adead429954162e1 Mon Sep 17 00:00:00 2001 +From: Mark Wielaard +Date: Tue, 27 Nov 2018 11:59:10 +0000 +Subject: [PATCH 1/2] Handle ELF compressed header alignment correctly by + setting up the section alignment correctly for the Elf32_Chdr or Elf64_Chdr + type and respect the ch_addralign field when decompressing the section data. + + PR binutils/23919 +binutils* readelf.c (dump_sections_as_strings): Remove bogus addralign check. + (dump_sections_as_bytes): Likewise. + (load_specific_debug_sections): Likewise. + * testsuite/binutils-all/dw2-3.rS: Adjust alignment. + * testsuite/binutils-all/dw2-3.rt: Likewise. + +bfd * bfd.c (bfd_update_compression_header): Explicitly set alignment. + (bfd_check_compression_header): Add uncompressed_alignment_power + argument. Check ch_addralign is a power of 2. + * bfd-in2.h: Regenerated. + * compress.c (bfd_compress_section_contents): Get and set + orig_uncompressed_alignment_pow if section is decompressed. + (bfd_is_section_compressed_with_header): Add and get + uncompressed_align_pow_p argument. + (bfd_is_section_compressed): Add uncompressed_align_power argument + to bfd_is_section_compressed_with_header call. + (bfd_init_section_decompress_status): Get and set + uncompressed_alignment_power. + * elf.c (_bfd_elf_make_section_from_shdr): Add + uncompressed_align_power argument to + bfd_is_section_compressed_with_header call. +--- + bfd/bfd-in2.h | 6 ++-- + bfd/bfd.c | 20 ++++++++++---- + bfd/compress.c | 35 +++++++++++++++++------- + bfd/elf.c | 5 ++-- + binutils/readelf.c | 18 ------------ + binutils/testsuite/binutils-all/dw2-3.rS | 2 +- + binutils/testsuite/binutils-all/dw2-3.rt | 2 +- + 7 files changed, 49 insertions(+), 39 deletions(-) + +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4207142d6a5d2359170c5f9a140fc1a2351fbda9] +Signed-off-by: Khem Raj + +diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h +index f53dbb5e8c..d0c2190d0b 100644 +--- a/bfd/bfd-in2.h ++++ b/bfd/bfd-in2.h +@@ -7279,7 +7279,8 @@ void bfd_update_compression_header + + bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, +- bfd_size_type *uncompressed_size); ++ bfd_size_type *uncompressed_size, ++ unsigned int *uncompressed_alignment_power); + + int bfd_get_compression_header_size (bfd *abfd, asection *sec); + +@@ -7855,7 +7856,8 @@ void bfd_cache_section_contents + bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, +- bfd_size_type *uncompressed_size_p); ++ bfd_size_type *uncompressed_size_p, ++ unsigned int *uncompressed_alignment_power_p); + + bfd_boolean bfd_is_section_compressed + (bfd *abfd, asection *section); +diff --git a/bfd/bfd.c b/bfd/bfd.c +index 851710401e..ea10d7b185 100644 +--- a/bfd/bfd.c ++++ b/bfd/bfd.c +@@ -2332,6 +2332,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents, + bfd_put_32 (abfd, sec->size, &echdr->ch_size); + bfd_put_32 (abfd, 1 << sec->alignment_power, + &echdr->ch_addralign); ++ /* bfd_log2 (alignof (Elf32_Chdr)) */ ++ bfd_set_section_alignment (abfd, sec, 2); + } + else + { +@@ -2342,6 +2344,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents, + bfd_put_64 (abfd, sec->size, &echdr->ch_size); + bfd_put_64 (abfd, 1 << sec->alignment_power, + &echdr->ch_addralign); ++ /* bfd_log2 (alignof (Elf64_Chdr)) */ ++ bfd_set_section_alignment (abfd, sec, 3); + } + } + else +@@ -2354,6 +2358,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents, + order. */ + memcpy (contents, "ZLIB", 4); + bfd_putb64 (sec->size, contents + 4); ++ /* No way to keep the original alignment, just use 1 always. */ ++ bfd_set_section_alignment (abfd, sec, 0); + } + } + } +@@ -2368,12 +2374,14 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents, + SYNOPSIS + bfd_boolean bfd_check_compression_header + (bfd *abfd, bfd_byte *contents, asection *sec, +- bfd_size_type *uncompressed_size); ++ bfd_size_type *uncompressed_size, ++ unsigned int *uncompressed_alignment_power); + + DESCRIPTION + Check the compression header at CONTENTS of SEC in ABFD and +- store the uncompressed size in UNCOMPRESSED_SIZE if the +- compression header is valid. ++ store the uncompressed size in UNCOMPRESSED_SIZE and the ++ uncompressed data alignment in UNCOMPRESSED_ALIGNMENT_POWER ++ if the compression header is valid. + + RETURNS + Return TRUE if the compression header is valid. +@@ -2382,7 +2390,8 @@ RETURNS + bfd_boolean + bfd_check_compression_header (bfd *abfd, bfd_byte *contents, + asection *sec, +- bfd_size_type *uncompressed_size) ++ bfd_size_type *uncompressed_size, ++ unsigned int *uncompressed_alignment_power) + { + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour + && (elf_section_flags (sec) & SHF_COMPRESSED) != 0) +@@ -2404,9 +2413,10 @@ bfd_check_compression_header (bfd *abfd, bfd_byte *contents, + chdr.ch_addralign = bfd_get_64 (abfd, &echdr->ch_addralign); + } + if (chdr.ch_type == ELFCOMPRESS_ZLIB +- && chdr.ch_addralign == 1U << sec->alignment_power) ++ && chdr.ch_addralign == (1U << bfd_log2 (chdr.ch_addralign))) + { + *uncompressed_size = chdr.ch_size; ++ *uncompressed_alignment_power = bfd_log2 (chdr.ch_addralign); + return TRUE; + } + } +diff --git a/bfd/compress.c b/bfd/compress.c +index 53e566e498..97ea624eb8 100644 +--- a/bfd/compress.c ++++ b/bfd/compress.c +@@ -84,11 +84,13 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec, + int zlib_size = 0; + int orig_compression_header_size; + bfd_size_type orig_uncompressed_size; ++ unsigned int orig_uncompressed_alignment_pow; + int header_size = bfd_get_compression_header_size (abfd, NULL); + bfd_boolean compressed + = bfd_is_section_compressed_with_header (abfd, sec, + &orig_compression_header_size, +- &orig_uncompressed_size); ++ &orig_uncompressed_size, ++ &orig_uncompressed_alignment_pow); + + /* Either ELF compression header or the 12-byte, "ZLIB" + 8-byte size, + overhead in .zdebug* section. */ +@@ -153,6 +155,9 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec, + return 0; + } + free (uncompressed_buffer); ++ bfd_set_section_alignment (abfd, sec, ++ orig_uncompressed_alignment_pow); ++ + sec->contents = buffer; + sec->compress_status = COMPRESS_SECTION_DONE; + return orig_uncompressed_size; +@@ -364,20 +369,24 @@ SYNOPSIS + bfd_boolean bfd_is_section_compressed_with_header + (bfd *abfd, asection *section, + int *compression_header_size_p, +- bfd_size_type *uncompressed_size_p); ++ bfd_size_type *uncompressed_size_p, ++ unsigned int *uncompressed_alignment_power_p); + + DESCRIPTION + Return @code{TRUE} if @var{section} is compressed. Compression +- header size is returned in @var{compression_header_size_p} and +- uncompressed size is returned in @var{uncompressed_size_p}. If +- compression is unsupported, compression header size is returned +- with -1 and uncompressed size is returned with 0. ++ header size is returned in @var{compression_header_size_p}, ++ uncompressed size is returned in @var{uncompressed_size_p} ++ and the uncompressed data alignement power is returned in ++ @var{uncompressed_align_pow_p}. If compression is ++ unsupported, compression header size is returned with -1 ++ and uncompressed size is returned with 0. + */ + + bfd_boolean + bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec, + int *compression_header_size_p, +- bfd_size_type *uncompressed_size_p) ++ bfd_size_type *uncompressed_size_p, ++ unsigned int *uncompressed_align_pow_p) + { + bfd_byte header[MAX_COMPRESSION_HEADER_SIZE]; + int compression_header_size; +@@ -412,7 +421,8 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec, + if (compression_header_size != 0) + { + if (!bfd_check_compression_header (abfd, header, sec, +- uncompressed_size_p)) ++ uncompressed_size_p, ++ uncompressed_align_pow_p)) + compression_header_size = -1; + } + /* Check for the pathalogical case of a debug string section that +@@ -449,9 +459,11 @@ bfd_is_section_compressed (bfd *abfd, sec_ptr sec) + { + int compression_header_size; + bfd_size_type uncompressed_size; ++ unsigned int uncompressed_align_power; + return (bfd_is_section_compressed_with_header (abfd, sec, + &compression_header_size, +- &uncompressed_size) ++ &uncompressed_size, ++ &uncompressed_align_power) + && compression_header_size >= 0 + && uncompressed_size > 0); + } +@@ -480,6 +492,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec) + int compression_header_size; + int header_size; + bfd_size_type uncompressed_size; ++ unsigned int uncompressed_alignment_power = 0; + + compression_header_size = bfd_get_compression_header_size (abfd, sec); + if (compression_header_size > MAX_COMPRESSION_HEADER_SIZE) +@@ -508,7 +521,8 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec) + uncompressed_size = bfd_getb64 (header + 4); + } + else if (!bfd_check_compression_header (abfd, header, sec, +- &uncompressed_size)) ++ &uncompressed_size, ++ &uncompressed_alignment_power)) + { + bfd_set_error (bfd_error_wrong_format); + return FALSE; +@@ -516,6 +530,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec) + + sec->compressed_size = sec->size; + sec->size = uncompressed_size; ++ bfd_set_section_alignment (abfd, sec, uncompressed_alignment_power); + sec->compress_status = DECOMPRESS_SECTION_SIZED; + + return TRUE; +diff --git a/bfd/elf.c b/bfd/elf.c +index 828241d48a..c4f131ddcf 100644 +--- a/bfd/elf.c ++++ b/bfd/elf.c +@@ -1177,11 +1177,12 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, + enum { nothing, compress, decompress } action = nothing; + int compression_header_size; + bfd_size_type uncompressed_size; ++ unsigned int uncompressed_align_power; + bfd_boolean compressed + = bfd_is_section_compressed_with_header (abfd, newsect, + &compression_header_size, +- &uncompressed_size); +- ++ &uncompressed_size, ++ &uncompressed_align_power); + if (compressed) + { + /* Compressed section. Check if we should decompress. */ +diff --git a/binutils/readelf.c b/binutils/readelf.c +index f4df697a7d..4b0efa884f 100644 +--- a/binutils/readelf.c ++++ b/binutils/readelf.c +@@ -13345,12 +13345,6 @@ dump_section_as_strings (Elf_Internal_Shdr * section, Filedata * filedata) + printable_section_name (filedata, section), chdr.ch_type); + return FALSE; + } +- else if (chdr.ch_addralign != section->sh_addralign) +- { +- warn (_("compressed section '%s' is corrupted\n"), +- printable_section_name (filedata, section)); +- return FALSE; +- } + uncompressed_size = chdr.ch_size; + start += compression_header_size; + new_size -= compression_header_size; +@@ -13492,12 +13486,6 @@ dump_section_as_bytes (Elf_Internal_Shdr * section, + printable_section_name (filedata, section), chdr.ch_type); + return FALSE; + } +- else if (chdr.ch_addralign != section->sh_addralign) +- { +- warn (_("compressed section '%s' is corrupted\n"), +- printable_section_name (filedata, section)); +- return FALSE; +- } + uncompressed_size = chdr.ch_size; + start += compression_header_size; + new_size -= compression_header_size; +@@ -13667,12 +13655,6 @@ load_specific_debug_section (enum dwarf_section_display_enum debug, + section->name, chdr.ch_type); + return FALSE; + } +- else if (chdr.ch_addralign != sec->sh_addralign) +- { +- warn (_("compressed section '%s' is corrupted\n"), +- section->name); +- return FALSE; +- } + uncompressed_size = chdr.ch_size; + start += compression_header_size; + size -= compression_header_size; +diff --git a/binutils/testsuite/binutils-all/dw2-3.rS b/binutils/testsuite/binutils-all/dw2-3.rS +index f1637e9149..86bc73d9a2 100644 +--- a/binutils/testsuite/binutils-all/dw2-3.rS ++++ b/binutils/testsuite/binutils-all/dw2-3.rS +@@ -1,3 +1,3 @@ + #... +- +\[[ 0-9]+\] .debug_info +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +C +0 +0 +1 ++ +\[[ 0-9]+\] .debug_info +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +C +0 +0 +(4|8) + #pass +diff --git a/binutils/testsuite/binutils-all/dw2-3.rt b/binutils/testsuite/binutils-all/dw2-3.rt +index f59cbaa22b..74e7f8deca 100644 +--- a/binutils/testsuite/binutils-all/dw2-3.rt ++++ b/binutils/testsuite/binutils-all/dw2-3.rt +@@ -1,6 +1,6 @@ + #... + +\[[ 0-9]+\] .debug_info +- +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+ +0 +0 +1 ++ +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+ +0 +0 +(4|8) + +\[0+800\]: COMPRESSED + +ZLIB, 0+9d, 1 + #pass +-- +2.20.1 + diff --git a/poky/meta/recipes-devtools/binutils/binutils/0023-gold-Get-alignment-of-uncompressed-section-from-ch_a.patch b/poky/meta/recipes-devtools/binutils/binutils/0023-gold-Get-alignment-of-uncompressed-section-from-ch_a.patch new file mode 100644 index 000000000..1f072a605 --- /dev/null +++ b/poky/meta/recipes-devtools/binutils/binutils/0023-gold-Get-alignment-of-uncompressed-section-from-ch_a.patch @@ -0,0 +1,200 @@ +From 0261ec511ac07177fa488133e0bb3c03860977b3 Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Sun, 2 Dec 2018 05:42:36 -0800 +Subject: [PATCH 2/2] gold: Get alignment of uncompressed section from + ch_addralign + +The ELF compression header has a field (ch_addralign) that is set to +the alignment of the uncompressed section. This way the section itself +can have a different alignment than the decompressed section. Update +decompress_input_section to get alignment of the decompressed section +and use it when merging decompressed strings. + + PR binutils/23919 + * merge.cc (Output_merge_string::do_add_input_section): + Get addralign from decompressed_section_contents. + * object.cc (build_compressed_section_map): Set info.addralign. + (Object::decompressed_section_contents): Add a palign + argument and store p->second.addralign in *palign if it isn't + NULL. + * object.h (Compressed_section_info): Add addralign. + (section_is_compressed): Add a palign argument, default it + to NULL, store p->second.addralign in *palign if it isn't NULL. + (Object::decompressed_section_contents): Likewise. + * output.cc (Output_section::add_input_section): Get addralign + from section_is_compressed. +--- + gold/merge.cc | 8 +++++--- + gold/object.cc | 11 +++++++++-- + gold/object.h | 8 ++++++-- + gold/output.cc | 11 ++++++----- + 4 files changed, 26 insertions(+), 12 deletions(-) + +Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5f6c22aee74f17393b82934a5682d985672e011a] +Signed-off-by: Khem Raj + + +diff --git a/gold/merge.cc b/gold/merge.cc +index de00ee9ae9..d7de11789f 100644 +--- a/gold/merge.cc ++++ b/gold/merge.cc +@@ -440,9 +440,11 @@ Output_merge_string::do_add_input_section(Relobj* object, + { + section_size_type sec_len; + bool is_new; ++ uint64_t addralign = this->addralign(); + const unsigned char* pdata = object->decompressed_section_contents(shndx, + &sec_len, +- &is_new); ++ &is_new, ++ &addralign); + + const Char_type* p = reinterpret_cast(pdata); + const Char_type* pend = p + sec_len / sizeof(Char_type); +@@ -494,7 +496,7 @@ Output_merge_string::do_add_input_section(Relobj* object, + // aligned, so each string within the section must retain the same + // modulo. + uintptr_t init_align_modulo = (reinterpret_cast(pdata) +- & (this->addralign() - 1)); ++ & (addralign - 1)); + bool has_misaligned_strings = false; + + while (p < pend) +@@ -503,7 +505,7 @@ Output_merge_string::do_add_input_section(Relobj* object, + + // Within merge input section each string must be aligned. + if (len != 0 +- && ((reinterpret_cast(p) & (this->addralign() - 1)) ++ && ((reinterpret_cast(p) & (addralign - 1)) + != init_align_modulo)) + has_misaligned_strings = true; + +diff --git a/gold/object.cc b/gold/object.cc +index 374340fa16..711793e5e4 100644 +--- a/gold/object.cc ++++ b/gold/object.cc +@@ -751,11 +751,13 @@ build_compressed_section_map( + const unsigned char* contents = + obj->section_contents(i, &len, false); + uint64_t uncompressed_size; ++ Compressed_section_info info; + if (is_zcompressed) + { + // Skip over the ".zdebug" prefix. + name += 7; + uncompressed_size = get_uncompressed_size(contents, len); ++ info.addralign = shdr.get_sh_addralign(); + } + else + { +@@ -763,8 +765,8 @@ build_compressed_section_map( + name += 6; + elfcpp::Chdr chdr(contents); + uncompressed_size = chdr.get_ch_size(); ++ info.addralign = chdr.get_ch_addralign(); + } +- Compressed_section_info info; + info.size = convert_to_section_size_type(uncompressed_size); + info.flag = shdr.get_sh_flags(); + info.contents = NULL; +@@ -3060,7 +3062,8 @@ const unsigned char* + Object::decompressed_section_contents( + unsigned int shndx, + section_size_type* plen, +- bool* is_new) ++ bool* is_new, ++ uint64_t* palign) + { + section_size_type buffer_size; + const unsigned char* buffer = this->do_section_contents(shndx, &buffer_size, +@@ -3087,6 +3090,8 @@ Object::decompressed_section_contents( + { + *plen = uncompressed_size; + *is_new = false; ++ if (palign != NULL) ++ *palign = p->second.addralign; + return p->second.contents; + } + +@@ -3108,6 +3113,8 @@ Object::decompressed_section_contents( + // once in this pass. + *plen = uncompressed_size; + *is_new = true; ++ if (palign != NULL) ++ *palign = p->second.addralign; + return uncompressed_data; + } + +diff --git a/gold/object.h b/gold/object.h +index 0b786a5471..b99548463d 100644 +--- a/gold/object.h ++++ b/gold/object.h +@@ -373,6 +373,7 @@ struct Compressed_section_info + { + section_size_type size; + elfcpp::Elf_Xword flag; ++ uint64_t addralign; + const unsigned char* contents; + }; + typedef std::map Compressed_section_map; +@@ -808,7 +809,8 @@ class Object + + bool + section_is_compressed(unsigned int shndx, +- section_size_type* uncompressed_size) const ++ section_size_type* uncompressed_size, ++ elfcpp::Elf_Xword* palign = NULL) const + { + if (this->compressed_sections_ == NULL) + return false; +@@ -818,6 +820,8 @@ class Object + { + if (uncompressed_size != NULL) + *uncompressed_size = p->second.size; ++ if (palign != NULL) ++ *palign = p->second.addralign; + return true; + } + return false; +@@ -828,7 +832,7 @@ class Object + // by the caller. + const unsigned char* + decompressed_section_contents(unsigned int shndx, section_size_type* plen, +- bool* is_cached); ++ bool* is_cached, uint64_t* palign = NULL); + + // Discard any buffers of decompressed sections. This is done + // at the end of the Add_symbols task. +diff --git a/gold/output.cc b/gold/output.cc +index 1701db1c99..75ac3bcf97 100644 +--- a/gold/output.cc ++++ b/gold/output.cc +@@ -2448,7 +2448,13 @@ Output_section::add_input_section(Layout* layout, + unsigned int reloc_shndx, + bool have_sections_script) + { ++ section_size_type input_section_size = shdr.get_sh_size(); ++ section_size_type uncompressed_size; + elfcpp::Elf_Xword addralign = shdr.get_sh_addralign(); ++ if (object->section_is_compressed(shndx, &uncompressed_size, ++ &addralign)) ++ input_section_size = uncompressed_size; ++ + if ((addralign & (addralign - 1)) != 0) + { + object->error(_("invalid alignment %lu for section \"%s\""), +@@ -2498,11 +2504,6 @@ Output_section::add_input_section(Layout* layout, + } + } + +- section_size_type input_section_size = shdr.get_sh_size(); +- section_size_type uncompressed_size; +- if (object->section_is_compressed(shndx, &uncompressed_size)) +- input_section_size = uncompressed_size; +- + off_t offset_in_section; + + if (this->has_fixed_layout()) +-- +2.20.1 + diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch index 813509160..d5a1ea1dc 100644 --- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch +++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17358.patch @@ -21,25 +21,6 @@ Signed-off-by: Zhixiong Chi bfd/syms.c | 22 ++++++++++++++++------ 3 files changed, 33 insertions(+), 7 deletions(-) -diff --git a/bfd/ChangeLog b/bfd/ChangeLog -index 04c0c2a..fef5479 100644 ---- a/bfd/ChangeLog -+++ b/bfd/ChangeLog -@@ -1,3 +1,12 @@ -+2018-09-20 Alan Modra -+ -+ PR 23686 -+ * dwarf2.c (read_section): Error when attempting to malloc -+ "(bfd_size_type) -1". -+ * syms.c (_bfd_stab_section_find_nearest_line): Bounds check -+ function_name. Bounds check reloc address. Formatting. Ensure -+ .stabstr zero terminated. -+ - 2018-08-12 H.J. Lu - - PR ld/23428 -diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c -index 3b28855..77a7368 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -527,6 +527,7 @@ read_section (bfd * abfd, @@ -65,11 +46,9 @@ index 3b28855..77a7368 100644 if (contents == NULL) return FALSE; if (syms -diff --git a/bfd/syms.c b/bfd/syms.c -index 187071f..e09640a 100644 --- a/bfd/syms.c +++ b/bfd/syms.c -@@ -1035,6 +1035,10 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, +@@ -1035,6 +1035,10 @@ _bfd_stab_section_find_nearest_line (bfd 0, strsize)) return FALSE; @@ -80,7 +59,7 @@ index 187071f..e09640a 100644 /* If this is a relocatable object file, we have to relocate the entries in .stab. This should always be simple 32 bit relocations against symbols defined in this object file, so -@@ -1073,7 +1077,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, +@@ -1073,7 +1077,8 @@ _bfd_stab_section_find_nearest_line (bfd || r->howto->bitsize != 32 || r->howto->pc_relative || r->howto->bitpos != 0 @@ -90,7 +69,7 @@ index 187071f..e09640a 100644 { _bfd_error_handler (_("unsupported .stab relocation")); -@@ -1195,7 +1200,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, +@@ -1195,7 +1200,8 @@ _bfd_stab_section_find_nearest_line (bfd { nul_fun = stab; nul_str = str; @@ -100,7 +79,7 @@ index 187071f..e09640a 100644 file_name = NULL; if (stab + STABSIZE + TYPEOFF < info->stabs + stabsize && *(stab + STABSIZE + TYPEOFF) == (bfd_byte) N_SO) -@@ -1206,7 +1212,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, +@@ -1206,7 +1212,8 @@ _bfd_stab_section_find_nearest_line (bfd directory_name = file_name; file_name = ((char *) str + bfd_get_32 (abfd, stab + STRDXOFF)); @@ -110,7 +89,7 @@ index 187071f..e09640a 100644 file_name = NULL; } } -@@ -1217,7 +1224,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, +@@ -1217,7 +1224,8 @@ _bfd_stab_section_find_nearest_line (bfd file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); /* PR 17512: file: 0c680a1f. */ /* PR 17512: file: 5da8aec4. */ @@ -120,7 +99,7 @@ index 187071f..e09640a 100644 file_name = NULL; break; -@@ -1226,7 +1234,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, +@@ -1226,7 +1234,8 @@ _bfd_stab_section_find_nearest_line (bfd function_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); if (function_name == (char *) str) continue; @@ -130,7 +109,7 @@ index 187071f..e09640a 100644 function_name = NULL; nul_fun = NULL; -@@ -1335,7 +1344,8 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, +@@ -1335,7 +1344,8 @@ _bfd_stab_section_find_nearest_line (bfd if (val <= offset) { file_name = (char *) str + bfd_get_32 (abfd, stab + STRDXOFF); @@ -140,5 +119,3 @@ index 187071f..e09640a 100644 file_name = NULL; *pline = 0; } --- -2.9.3 diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17360.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17360.patch index cef10a754..45c637967 100644 --- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17360.patch +++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-17360.patch @@ -15,27 +15,9 @@ Signed-off-by: Zhixiong Chi bfd/peXXigen.c | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) -diff --git a/bfd/ChangeLog b/bfd/ChangeLog -index fef5479..81b9e56 100644 ---- a/bfd/ChangeLog -+++ b/bfd/ChangeLog -@@ -1,5 +1,11 @@ - 2018-09-20 Alan Modra - -+ PR 23685 -+ * peXXigen.c (pe_print_edata): Correct export address table -+ overflow checks. Check dataoff against section size too. -+ -+2018-09-20 Alan Modra -+ - PR 23686 - * dwarf2.c (read_section): Error when attempting to malloc - "(bfd_size_type) -1". -diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c -index 598f2ca..1645ef4 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c -@@ -1661,7 +1661,8 @@ pe_print_edata (bfd * abfd, void * vfile) +@@ -1661,7 +1661,8 @@ pe_print_edata (bfd * abfd, void * vfile dataoff = addr - section->vma; datasize = extra->DataDirectory[PE_EXPORT_TABLE].Size; @@ -45,7 +27,7 @@ index 598f2ca..1645ef4 100644 { fprintf (file, _("\nThere is an export table in %s, but it does not fit into that section\n"), -@@ -1778,11 +1779,11 @@ pe_print_edata (bfd * abfd, void * vfile) +@@ -1778,11 +1779,11 @@ pe_print_edata (bfd * abfd, void * vfile edt.base); /* PR 17512: Handle corrupt PE binaries. */ @@ -61,5 +43,3 @@ index 598f2ca..1645ef4 100644 fprintf (file, _("\tInvalid Export Address Table rva (0x%lx) or entry count (0x%lx)\n"), (long) edt.eat_addr, (long) edt.num_functions); --- -2.9.3 diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18309.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18309.patch index b240a3f99..010e6b5d5 100644 --- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18309.patch +++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18309.patch @@ -49,39 +49,9 @@ Signed-off-by: Zhixiong Chi bfd/reloc.c | 19 +++++++++++++------ 14 files changed, 50 insertions(+), 23 deletions(-) -diff --git a/bfd/ChangeLog b/bfd/ChangeLog -index 68c1ff665b..e9696ee314 100644 ---- a/bfd/ChangeLog -+++ b/bfd/ChangeLog -@@ -1,3 +1,23 @@ -+2018-10-13 Alan Modra -+ -+ PR 23770 -+ PR 23425 -+ * reloc.c (_bfd_clear_contents): Replace "location" param with -+ "buf" and "off". Bounds check "off". Return status. -+ * cofflink.c (_bfd_coff_generic_relocate_section): Update -+ _bfd_clear_contents call. -+ * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Likewise. -+ * elf32-arc.c (elf_arc_relocate_section): Likewise. -+ * elf32-i386.c (elf_i386_relocate_section): Likewise. -+ * elf32-metag.c (metag_final_link_relocate): Likewise. -+ * elf32-nds32.c (nds32_elf_get_relocated_section_contents): Likewise. -+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise. -+ * elf32-visium.c (visium_elf_relocate_section): Likewise. -+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. -+ * elf64-x86-64.c *(elf_x86_64_relocate_section): Likewise. -+ * libbfd-in.h (_bfd_clear_contents): Update prototype. -+ * libbfd.h: Regenerate. -+ - 2018-09-20 Alan Modra - - PR 23685 -diff --git a/bfd/cofflink.c b/bfd/cofflink.c -index 2f73f72e31..b7ea69b7f9 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c -@@ -3080,7 +3080,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, +@@ -3080,7 +3080,7 @@ _bfd_coff_generic_relocate_section (bfd if (sec != NULL && discarded_section (sec)) { _bfd_clear_contents (howto, input_bfd, input_section, @@ -90,11 +60,9 @@ index 2f73f72e31..b7ea69b7f9 100644 continue; } -diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h -index cf256f70e0..3374f411f9 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h -@@ -2811,7 +2811,7 @@ extern asection _bfd_elf_large_com_section; +@@ -2811,7 +2811,7 @@ extern asection _bfd_elf_large_com_secti { \ int i_; \ _bfd_clear_contents (howto, input_bfd, input_section, \ @@ -103,11 +71,9 @@ index cf256f70e0..3374f411f9 100644 \ if (bfd_link_relocatable (info) \ && (input_section->flags & SEC_DEBUGGING)) \ -diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c -index 7a1b3042ae..30f47a5b22 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c -@@ -1549,7 +1549,7 @@ elf_arc_relocate_section (bfd * output_bfd, +@@ -1552,7 +1552,7 @@ elf_arc_relocate_section (bfd * outp if (sec != NULL && discarded_section (sec)) { _bfd_clear_contents (howto, input_bfd, input_section, @@ -116,11 +82,9 @@ index 7a1b3042ae..30f47a5b22 100644 rel->r_info = 0; rel->r_addend = 0; -diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c -index 49797dcbfa..177471777d 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c -@@ -2197,7 +2197,7 @@ elf_i386_relocate_section (bfd *output_bfd, +@@ -2197,7 +2197,7 @@ elf_i386_relocate_section (bfd *output_b if (sec != NULL && discarded_section (sec)) { _bfd_clear_contents (howto, input_bfd, input_section, @@ -129,11 +93,9 @@ index 49797dcbfa..177471777d 100644 wrel->r_offset = rel->r_offset; wrel->r_info = 0; wrel->r_addend = 0; -diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c -index efe95bddff..7f96246e5d 100644 --- a/bfd/elf32-metag.c +++ b/bfd/elf32-metag.c -@@ -1396,7 +1396,7 @@ metag_final_link_relocate (reloc_howto_type *howto, +@@ -1396,7 +1396,7 @@ metag_final_link_relocate (reloc_howto_t rel, relend, howto, contents) \ { \ _bfd_clear_contents (howto, input_bfd, input_section, \ @@ -142,11 +104,9 @@ index efe95bddff..7f96246e5d 100644 \ if (bfd_link_relocatable (info) \ && (input_section->flags & SEC_DEBUGGING)) \ -diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c -index 0d86e5b865..184cf320f7 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c -@@ -12582,14 +12582,14 @@ nds32_elf_get_relocated_section_contents (bfd *abfd, +@@ -12582,14 +12582,14 @@ nds32_elf_get_relocated_section_contents symbol = *(*parent)->sym_ptr_ptr; if (symbol->section && discarded_section (symbol->section)) { @@ -165,11 +125,9 @@ index 0d86e5b865..184cf320f7 100644 (*parent)->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; (*parent)->addend = 0; (*parent)->howto = &none_howto; -diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c -index 61f70de12e..c31e26efd7 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c -@@ -8232,7 +8232,7 @@ ppc_elf_relocate_section (bfd *output_bfd, +@@ -8232,7 +8232,7 @@ ppc_elf_relocate_section (bfd *output_bf howto = ppc_elf_howto_table[r_type]; _bfd_clear_contents (howto, input_bfd, input_section, @@ -178,11 +136,9 @@ index 61f70de12e..c31e26efd7 100644 wrel->r_offset = rel->r_offset; wrel->r_info = 0; wrel->r_addend = 0; -diff --git a/bfd/elf32-visium.c b/bfd/elf32-visium.c -index e8f1c4c9e4..961366cd87 100644 --- a/bfd/elf32-visium.c +++ b/bfd/elf32-visium.c -@@ -621,7 +621,7 @@ visium_elf_relocate_section (bfd *output_bfd, +@@ -621,7 +621,7 @@ visium_elf_relocate_section (bfd *output or sections discarded by a linker script, we just want the section contents zeroed. Avoid any special processing. */ _bfd_clear_contents (howto, input_bfd, input_section, @@ -191,11 +147,9 @@ index e8f1c4c9e4..961366cd87 100644 rel->r_info = 0; rel->r_addend = 0; -diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c -index eadde17615..7c3534ac65 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c -@@ -14073,7 +14073,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, +@@ -14074,7 +14074,7 @@ ppc64_elf_relocate_section (bfd *output_ { _bfd_clear_contents (ppc64_elf_howto_table[r_type], input_bfd, input_section, @@ -204,11 +158,9 @@ index eadde17615..7c3534ac65 100644 wrel->r_offset = rel->r_offset; wrel->r_info = 0; wrel->r_addend = 0; -diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c -index c3a6c31ed2..4dcab43478 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c -@@ -2490,7 +2490,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, +@@ -2490,7 +2490,7 @@ elf_x86_64_relocate_section (bfd *output if (sec != NULL && discarded_section (sec)) { _bfd_clear_contents (howto, input_bfd, input_section, @@ -217,11 +169,9 @@ index c3a6c31ed2..4dcab43478 100644 wrel->r_offset = rel->r_offset; wrel->r_info = 0; wrel->r_addend = 0; -diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h -index e53b255dad..f6d9565f03 100644 --- a/bfd/libbfd-in.h +++ b/bfd/libbfd-in.h -@@ -696,8 +696,8 @@ extern bfd_reloc_status_type _bfd_relocate_contents +@@ -696,8 +696,8 @@ extern bfd_reloc_status_type _bfd_reloca (reloc_howto_type *, bfd *, bfd_vma, bfd_byte *) ATTRIBUTE_HIDDEN; /* Clear a given location using a given howto. */ @@ -232,11 +182,9 @@ index e53b255dad..f6d9565f03 100644 /* Link stabs in sections in the first pass. */ -diff --git a/bfd/libbfd.h b/bfd/libbfd.h -index a8851c8026..1189e63358 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h -@@ -701,8 +701,8 @@ extern bfd_reloc_status_type _bfd_relocate_contents +@@ -701,8 +701,8 @@ extern bfd_reloc_status_type _bfd_reloca (reloc_howto_type *, bfd *, bfd_vma, bfd_byte *) ATTRIBUTE_HIDDEN; /* Clear a given location using a given howto. */ @@ -247,11 +195,9 @@ index a8851c8026..1189e63358 100644 /* Link stabs in sections in the first pass. */ -diff --git a/bfd/reloc.c b/bfd/reloc.c -index 8dbb8896d3..1686780669 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c -@@ -1613,16 +1613,22 @@ _bfd_relocate_contents (reloc_howto_type *howto, +@@ -1613,16 +1613,22 @@ _bfd_relocate_contents (reloc_howto_type relocations against discarded symbols, to make ignorable debug or unwind information more obvious. */ @@ -276,7 +222,7 @@ index 8dbb8896d3..1686780669 100644 size = bfd_get_reloc_size (howto); switch (size) { -@@ -1687,6 +1693,7 @@ _bfd_clear_contents (reloc_howto_type *howto, +@@ -1681,6 +1687,7 @@ _bfd_clear_contents (reloc_howto_type *h #endif break; } @@ -284,7 +230,7 @@ index 8dbb8896d3..1686780669 100644 } /* -@@ -8275,14 +8282,14 @@ bfd_generic_get_relocated_section_contents (bfd *abfd, +@@ -8268,14 +8275,14 @@ bfd_generic_get_relocated_section_conten if (symbol->section && discarded_section (symbol->section)) { @@ -303,6 +249,3 @@ index 8dbb8896d3..1686780669 100644 (*parent)->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; (*parent)->addend = 0; (*parent)->howto = &none_howto; --- -2.13.3 - diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18605.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18605.patch index d6c706771..a117f95df 100644 --- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18605.patch +++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18605.patch @@ -15,25 +15,9 @@ Signed-off-by: Zhixiong Chi bfd/merge.c | 3 +++ 2 files changed, 9 insertions(+) -diff --git a/bfd/ChangeLog b/bfd/ChangeLog -index 31ff3d6..da423b1 100644 ---- a/bfd/ChangeLog -+++ b/bfd/ChangeLog -@@ -1,3 +1,9 @@ -+2018-10-23 Alan Modra -+ -+ PR 23804 -+ * merge.c (_bfd_add_merge_section): Don't attempt to merge -+ sections where size is not a multiple of entsize. -+ - 2018-10-13 Alan Modra - - PR 23770 -diff --git a/bfd/merge.c b/bfd/merge.c -index 7904552..5e3bba0 100644 --- a/bfd/merge.c +++ b/bfd/merge.c -@@ -376,6 +376,9 @@ _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec, +@@ -376,6 +376,9 @@ _bfd_add_merge_section (bfd *abfd, void || sec->entsize == 0) return TRUE; @@ -43,5 +27,3 @@ index 7904552..5e3bba0 100644 if ((sec->flags & SEC_RELOC) != 0) { /* We aren't prepared to handle relocations in merged sections. */ --- -2.9.3 diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18606.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18606.patch index 35cf328a1..325c339b8 100644 --- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18606.patch +++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18606.patch @@ -15,24 +15,6 @@ Signed-off-by: Zhixiong Chi bfd/merge.c | 15 +++++++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) -diff --git a/bfd/ChangeLog b/bfd/ChangeLog -index 1f3fc1c..c5f7ec7 100644 ---- a/bfd/ChangeLog -+++ b/bfd/ChangeLog -@@ -1,5 +1,11 @@ - 2018-10-23 Alan Modra - -+ PR 23806 -+ * merge.c (_bfd_add_merge_section): Don't attempt to merge -+ sections with ridiculously large alignments. -+ -+2018-10-23 Alan Modra -+ - PR 23804 - * merge.c (_bfd_add_merge_section): Don't attempt to merge - sections where size is not a multiple of entsize. -diff --git a/bfd/merge.c b/bfd/merge.c -index 5e3bba0..7de0c88 100644 --- a/bfd/merge.c +++ b/bfd/merge.c @@ -24,6 +24,7 @@ @@ -43,7 +25,7 @@ index 5e3bba0..7de0c88 100644 #include "bfd.h" #include "elf-bfd.h" #include "libbfd.h" -@@ -385,12 +386,18 @@ _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec, +@@ -385,12 +386,18 @@ _bfd_add_merge_section (bfd *abfd, void return TRUE; } @@ -66,5 +48,3 @@ index 5e3bba0..7de0c88 100644 { /* Sanity check. If string character size is smaller than alignment, then we require character size to be a power --- -2.9.3 diff --git a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18607.patch b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18607.patch index 38225d171..902a90dbc 100644 --- a/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18607.patch +++ b/poky/meta/recipes-devtools/binutils/binutils/CVE-2018-18607.patch @@ -16,28 +16,9 @@ Signed-off-by: Zhixiong Chi bfd/elflink.c | 20 ++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) -diff --git a/bfd/ChangeLog b/bfd/ChangeLog -index da423b1..1f3fc1c 100644 ---- a/bfd/ChangeLog -+++ b/bfd/ChangeLog -@@ -1,5 +1,12 @@ - 2018-10-23 Alan Modra - -+ PR 23805 -+ * elflink.c (elf_link_input_bfd): Don't segfault on finding -+ STT_TLS symbols without any TLS sections. Instead, change the -+ symbol type to STT_NOTYPE. -+ -+2018-10-23 Alan Modra -+ - PR 23806 - * merge.c (_bfd_add_merge_section): Don't attempt to merge - sections with ridiculously large alignments. -diff --git a/bfd/elflink.c b/bfd/elflink.c -index c3876cb..87440db 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c -@@ -10489,8 +10489,11 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) +@@ -10496,8 +10496,11 @@ elf_link_input_bfd (struct elf_final_lin if (ELF_ST_TYPE (osym.st_info) == STT_TLS) { /* STT_TLS symbols are relative to PT_TLS segment base. */ @@ -51,7 +32,7 @@ index c3876cb..87440db 100644 } } -@@ -11046,12 +11049,17 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) +@@ -11053,12 +11056,17 @@ elf_link_input_bfd (struct elf_final_lin sym.st_value += osec->vma; if (ELF_ST_TYPE (sym.st_info) == STT_TLS) { @@ -73,5 +54,3 @@ index c3876cb..87440db 100644 } } --- -2.9.3 diff --git a/poky/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch b/poky/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch new file mode 100644 index 000000000..29c0d48fe --- /dev/null +++ b/poky/meta/recipes-devtools/binutils/binutils/clang-bfd-fix.patch @@ -0,0 +1,30 @@ +Fix compiler error seen with clang, The return value of this +function is not checked anywhere so in a way its useless but +still technically correct to return a value here + +Fixes + +../../bfd/reloc.c:1638:7: error: non-void function '_bfd_clear_contents' should return a value [-Wreturn-type] + return; + ^ +1 error generated. + +It has been fixed in master along with a larger cleanup and fix for relocations + +https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=1dc9e2d63e37839ff1768346b2e3f52e338baba5 + +Upstream-Status: Backport [Fixes differently] + +Signed-off-by: Khem Raj + +--- a/bfd/reloc.c ++++ b/bfd/reloc.c +@@ -1629,7 +1629,7 @@ _bfd_clear_contents (reloc_howto_type *h + default: + abort (); + case 0: +- return; ++ return 0; + case 1: + x = bfd_get_8 (input_bfd, location); + break; diff --git a/poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch b/poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch deleted file mode 100644 index 5b1a53844..000000000 --- a/poky/meta/recipes-devtools/i2c-tools/files/0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 01674fefe3bd24fd93412fbb3eb4e85fe70c80aa Mon Sep 17 00:00:00 2001 -From: "Maxin B. John" -Date: Mon, 18 Dec 2017 16:01:39 +0200 -Subject: [PATCH] i2c-tools: eeprog/Module.mk: Add missing dependency - -Absence of this dependency caused parallel build to run into a race -and break. - -Upstream-Status: Accepted -https://git.kernel.org/pub/scm/utils/i2c-tools/i2c-tools.git/commit/?id=f87c97317012a3b96b67237925893b8ffd5f4f50 - -Signed-off-by: Maxin B. John ---- - eeprog/Module.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/eeprog/Module.mk b/eeprog/Module.mk -index 9d36869..d215855 100644 ---- a/eeprog/Module.mk -+++ b/eeprog/Module.mk -@@ -20,7 +20,7 @@ EEPROG_TARGETS := eeprog - # Programs - # - --$(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o -+$(EEPROG_DIR)/eeprog: $(EEPROG_DIR)/eeprog.o $(EEPROG_DIR)/24cXX.o $(LIB_DEPS) - $(CC) $(LDFLAGS) -o $@ $^ $(EEPROG_LDFLAGS) - - # --- -2.4.0 - diff --git a/poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch b/poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch deleted file mode 100644 index 426b4330e..000000000 --- a/poky/meta/recipes-devtools/i2c-tools/files/0001-lib-Module.mk-Add-missing-dependencies.patch +++ /dev/null @@ -1,37 +0,0 @@ -From a6a59693066fd8da81f7107479df3e32a129247d Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Wed, 6 Dec 2017 09:55:04 +0100 -Subject: [PATCH] lib/Module.mk: Add missing dependencies - -The lib symlinks lacked a dependency to the actual library file, so -parallel builds could run into a race and break. - -Upstream-Status: Backport - -Signed-off-by: Jean Delvare -Signed-off-by: Maxin B. John ---- - lib/Module.mk | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/Module.mk b/lib/Module.mk -index 432a051..fd2c8c4 100644 ---- a/lib/Module.mk -+++ b/lib/Module.mk -@@ -42,11 +42,11 @@ endif - $(LIB_DIR)/$(LIB_SHLIBNAME): $(LIB_DIR)/smbus.o - $(CC) -shared $(LDFLAGS) -Wl,--version-script=$(LIB_DIR)/libi2c.map -Wl,-soname,$(LIB_SHSONAME) -o $@ $^ -lc - --$(LIB_DIR)/$(LIB_SHSONAME): -+$(LIB_DIR)/$(LIB_SHSONAME): $(LIB_DIR)/$(LIB_SHLIBNAME) - $(RM) $@ - $(LN) $(LIB_SHLIBNAME) $@ - --$(LIB_DIR)/$(LIB_SHBASENAME): -+$(LIB_DIR)/$(LIB_SHBASENAME): $(LIB_DIR)/$(LIB_SHLIBNAME) - $(RM) $@ - $(LN) $(LIB_SHLIBNAME) $@ - --- -2.4.0 - diff --git a/poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch b/poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch deleted file mode 100644 index 33cf2d42a..000000000 --- a/poky/meta/recipes-devtools/i2c-tools/files/0001-tools-Module.mk-Add-missing-dependencies.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 08b0d67ba7eceb862cb17f52eb1911e9579726ea Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Thu, 14 Dec 2017 08:52:26 +0100 -Subject: [PATCH] tools/Module.mk: Add missing dependencies - -Better build the library before building the tools which link against -it, otherwise parallel builds could run into a race and break. - -Upstream-Status: Backport - -Signed-off-by: Jean Delvare -Tested-by: Angelo Compagnucci -Acked-by: Angelo Compagnucci -Signed-off-by: Maxin B. John ---- - lib/Module.mk | 7 +++++++ - tools/Module.mk | 10 +++++----- - 2 files changed, 12 insertions(+), 5 deletions(-) - -Index: i2c-tools-4.0/lib/Module.mk -=================================================================== ---- i2c-tools-4.0.orig/lib/Module.mk -+++ i2c-tools-4.0/lib/Module.mk -@@ -35,6 +35,13 @@ LIB_TARGETS += $(LIB_STLIBNAME) - LIB_OBJECTS += smbus.ao - endif - -+# Library file to link against (static or dynamic) -+ifeq ($(USE_STATIC_LIB),1) -+LIB_DEPS := $(LIB_DIR)/$(LIB_STLIBNAME) -+else -+LIB_DEPS := $(LIB_DIR)/$(LIB_SHBASENAME) -+endif -+ - # - # Libraries - # -Index: i2c-tools-4.0/tools/Module.mk -=================================================================== ---- i2c-tools-4.0.orig/tools/Module.mk -+++ i2c-tools-4.0/tools/Module.mk -@@ -24,19 +24,19 @@ TOOLS_TARGETS := i2cdetect i2cdump i2cse - # Programs - # - --$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o -+$(TOOLS_DIR)/i2cdetect: $(TOOLS_DIR)/i2cdetect.o $(TOOLS_DIR)/i2cbusses.o $(LIB_DEPS) - $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS) - --$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o -+$(TOOLS_DIR)/i2cdump: $(TOOLS_DIR)/i2cdump.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS) - $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS) - --$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o -+$(TOOLS_DIR)/i2cset: $(TOOLS_DIR)/i2cset.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS) - $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS) - --$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o -+$(TOOLS_DIR)/i2cget: $(TOOLS_DIR)/i2cget.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS) - $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS) - --$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o -+$(TOOLS_DIR)/i2ctransfer: $(TOOLS_DIR)/i2ctransfer.o $(TOOLS_DIR)/i2cbusses.o $(TOOLS_DIR)/util.o $(LIB_DEPS) - $(CC) $(LDFLAGS) -o $@ $^ $(TOOLS_LDFLAGS) - - # diff --git a/poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch b/poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch deleted file mode 100644 index 703688d08..000000000 --- a/poky/meta/recipes-devtools/i2c-tools/files/remove-i2c-dev.patch +++ /dev/null @@ -1,98 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton - -From 226bc03acca44cf4b300597308064c44676b6f4b Mon Sep 17 00:00:00 2001 -From: Jean Delvare -Date: Tue, 23 Jan 2018 14:24:16 +0100 -Subject: Delete duplicate i2c-dev.h - -The header file is provided by the kernel, so drop -our own copy of this file. - -Signed-off-by: Jean Delvare -Acked-by: Wolfram Sang ---- - include/linux/i2c-dev.h | 72 ------------------------------------------------- - 1 file changed, 72 deletions(-) - delete mode 100644 include/linux/i2c-dev.h - -diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h -deleted file mode 100644 -index 839d25a..0000000 ---- a/include/linux/i2c-dev.h -+++ /dev/null -@@ -1,72 +0,0 @@ --/* -- i2c-dev.h - i2c-bus driver, char device interface -- -- Copyright (C) 1995-97 Simon G. Vogl -- Copyright (C) 1998-99 Frodo Looijaard -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, write to the Free Software -- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -- MA 02110-1301 USA. --*/ -- --#ifndef _LINUX_I2C_DEV_H --#define _LINUX_I2C_DEV_H -- --#include -- -- --/* /dev/i2c-X ioctl commands. The ioctl's parameter is always an -- * unsigned long, except for: -- * - I2C_FUNCS, takes pointer to an unsigned long -- * - I2C_RDWR, takes pointer to struct i2c_rdwr_ioctl_data -- * - I2C_SMBUS, takes pointer to struct i2c_smbus_ioctl_data -- */ --#define I2C_RETRIES 0x0701 /* number of times a device address should -- be polled when not acknowledging */ --#define I2C_TIMEOUT 0x0702 /* set timeout in units of 10 ms */ -- --/* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses -- * are NOT supported! (due to code brokenness) -- */ --#define I2C_SLAVE 0x0703 /* Use this slave address */ --#define I2C_SLAVE_FORCE 0x0706 /* Use this slave address, even if it -- is already in use by a driver! */ --#define I2C_TENBIT 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */ -- --#define I2C_FUNCS 0x0705 /* Get the adapter functionality mask */ -- --#define I2C_RDWR 0x0707 /* Combined R/W transfer (one STOP only) */ -- --#define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */ --#define I2C_SMBUS 0x0720 /* SMBus transfer */ -- -- --/* This is the structure as used in the I2C_SMBUS ioctl call */ --struct i2c_smbus_ioctl_data { -- __u8 read_write; -- __u8 command; -- __u32 size; -- union i2c_smbus_data *data; --}; -- --/* This is the structure as used in the I2C_RDWR ioctl call */ --struct i2c_rdwr_ioctl_data { -- struct i2c_msg *msgs; /* pointers to i2c_msgs */ -- __u32 nmsgs; /* number of i2c_msgs */ --}; -- --#define I2C_RDRW_IOCTL_MAX_MSGS 42 -- -- --#endif /* _LINUX_I2C_DEV_H */ --- -cgit v1.1 diff --git a/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb b/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb deleted file mode 100644 index fe3247d82..000000000 --- a/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb +++ /dev/null @@ -1,45 +0,0 @@ -SUMMARY = "Set of i2c tools for linux" -HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools" -SECTION = "base" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" - -SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \ - file://0001-lib-Module.mk-Add-missing-dependencies.patch \ - file://0001-tools-Module.mk-Add-missing-dependencies.patch \ - file://0001-i2c-tools-eeprog-Module.mk-Add-missing-dependency.patch \ - file://remove-i2c-dev.patch \ -" - -SRC_URI[md5sum] = "d92a288d70f306d3895e3a7e9c14c9aa" -SRC_URI[sha256sum] = "5b60daf6f011de0acb61de57dba62f2054bb39f19961d67e0c91610f071ca403" - -inherit update-alternatives - -EXTRA_OEMAKE = "bindir=${bindir} sbindir=${sbindir} \ - incdir=${includedir} libdir=${libdir} \ - mandir=${mandir} \ - EXTRA=eeprog" - -do_install() { - oe_runmake 'DESTDIR=${D}' install -} - -PACKAGES =+ "${PN}-misc" -FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \ - ${bindir}/ddcmon \ - ${bindir}/decode-edid \ - ${bindir}/decode-dimms \ - ${bindir}/decode-vaio \ - " -RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \ - perl-module-constant perl-module-file-basename \ - perl-module-fcntl perl-module-strict perl-module-vars \ - " - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "i2cdetect i2cdump i2cget i2cset" -ALTERNATIVE_LINK_NAME[i2cdetect] = "${sbindir}/i2cdetect" -ALTERNATIVE_LINK_NAME[i2cdump] = "${sbindir}/i2cdump" -ALTERNATIVE_LINK_NAME[i2cget] = "${sbindir}/i2cget" -ALTERNATIVE_LINK_NAME[i2cset] = "${sbindir}/i2cset" diff --git a/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb b/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb new file mode 100644 index 000000000..2b4563d4f --- /dev/null +++ b/poky/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb @@ -0,0 +1,41 @@ +SUMMARY = "Set of i2c tools for linux" +HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools" +SECTION = "base" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \ +" + +SRC_URI[md5sum] = "3536237a6b51fb10caacdc3b8a496237" +SRC_URI[sha256sum] = "ef8f77afc70e7dbfd1171bfeae87a8a7f10074829370ce8d9ccd585a014e0073" + +inherit update-alternatives + +EXTRA_OEMAKE = "bindir=${bindir} sbindir=${sbindir} \ + incdir=${includedir} libdir=${libdir} \ + mandir=${mandir} \ + EXTRA=eeprog" + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +PACKAGES =+ "${PN}-misc" +FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \ + ${bindir}/ddcmon \ + ${bindir}/decode-edid \ + ${bindir}/decode-dimms \ + ${bindir}/decode-vaio \ + " +RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \ + perl-module-constant perl-module-file-basename \ + perl-module-fcntl perl-module-strict perl-module-vars \ + " + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "i2cdetect i2cdump i2cget i2cset" +ALTERNATIVE_LINK_NAME[i2cdetect] = "${sbindir}/i2cdetect" +ALTERNATIVE_LINK_NAME[i2cdump] = "${sbindir}/i2cdump" +ALTERNATIVE_LINK_NAME[i2cget] = "${sbindir}/i2cget" +ALTERNATIVE_LINK_NAME[i2cset] = "${sbindir}/i2cset" diff --git a/poky/meta/recipes-devtools/python/python-native_2.7.15.bb b/poky/meta/recipes-devtools/python/python-native_2.7.15.bb index de35104c6..9d0fe3b84 100644 --- a/poky/meta/recipes-devtools/python/python-native_2.7.15.bb +++ b/poky/meta/recipes-devtools/python/python-native_2.7.15.bb @@ -67,7 +67,7 @@ python(){ # Read JSON manifest import json - pythondir = d.getVar('THISDIR',True) + pythondir = d.getVar('THISDIR') with open(pythondir+'/python/python2-manifest.json') as manifest_file: manifest_str = manifest_file.read() json_start = manifest_str.find('# EOC') + 6 diff --git a/poky/meta/recipes-devtools/python/python3-native_3.5.6.bb b/poky/meta/recipes-devtools/python/python3-native_3.5.6.bb index 56236da07..c7bc4f3b0 100644 --- a/poky/meta/recipes-devtools/python/python3-native_3.5.6.bb +++ b/poky/meta/recipes-devtools/python/python3-native_3.5.6.bb @@ -81,7 +81,7 @@ python(){ # Read JSON manifest import json - pythondir = d.getVar('THISDIR',True) + pythondir = d.getVar('THISDIR') with open(pythondir+'/python3/python3-manifest.json') as manifest_file: python_manifest=json.load(manifest_file) diff --git a/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb b/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb index 200fe4da2..75ef3f4d0 100644 --- a/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb +++ b/poky/meta/recipes-devtools/rpm/rpm_4.14.2.bb @@ -104,9 +104,9 @@ do_install_append_class-native() { do_install_append_class-nativesdk() { for tool in ${WRAPPER_TOOLS}; do create_wrapper ${D}$tool \ - RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \ - RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/..} \ - MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/misc/magic.mgc \ + RPM_CONFIGDIR='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir'), d.getVar('bindir'))}/rpm \ + RPM_ETCCONFIGDIR='$'{RPM_ETCCONFIGDIR-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir'), d.getVar('bindir'))}/..} \ + MAGIC='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir'), d.getVar('bindir'))}/misc/magic.mgc \ RPM_NO_CHROOT_FOR_SCRIPTS=1 done -- cgit v1.2.3