From e5a81575f11dc2a0ec9ee4184514750d2dbd09aa Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 14 Oct 2016 05:04:07 -0700 Subject: binutils: Fix gas error with cfi_section inconsistencies This error is visible when using clang but not when using gcc this has been reported and fixed upstream. llvm bug https://llvm.org/bugs/show_bug.cgi?id=29017 binutils bug https://sourceware.org/bugzilla/show_bug.cgi?id=20648 Signed-off-by: Khem Raj Signed-off-by: Ross Burton --- meta/recipes-devtools/binutils/binutils-2.27.inc | 1 + ..._sections-check-to-only-consider-compact-.patch | 97 ++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch diff --git a/meta/recipes-devtools/binutils/binutils-2.27.inc b/meta/recipes-devtools/binutils/binutils-2.27.inc index b0c5267456..af1420b247 100644 --- a/meta/recipes-devtools/binutils/binutils-2.27.inc +++ b/meta/recipes-devtools/binutils/binutils-2.27.inc @@ -35,6 +35,7 @@ SRC_URI = "\ file://0013-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \ file://0014-libtool-remove-rpath.patch \ file://0015-binutils-mips-gas-pic-relax-linkonce.diff \ + file://0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch \ " S = "${WORKDIR}/git" diff --git a/meta/recipes-devtools/binutils/binutils/0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch b/meta/recipes-devtools/binutils/binutils/0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch new file mode 100644 index 0000000000..f3e3a11b14 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch @@ -0,0 +1,97 @@ +From 3d3424e9a8d6ad56160b98bf6e223c0346164468 Mon Sep 17 00:00:00 2001 +From: Matthew Fortune +Date: Thu, 29 Sep 2016 11:13:46 +0100 +Subject: [PATCH] Refine .cfi_sections check to only consider compact eh_frame + +The .cfi_sections directive can be safely used multiple times +with different sections named at any time unless the compact form +of exception handling is requested after CFI information has +been emitted. Only the compact form of CFI information changes +the way in which CFI is generated and therefore cannot be +retrospectively requested after generating CFI information. + +gas/ + + PR gas/20648 + * dw2gencfi.c (dot_cfi_sections): Refine the check for + inconsistent .cfi_sections to only consider compact vs non + compact forms. + * testsuite/gas/cfi/cfi-common-9.d: New file. + * testsuite/gas/cfi/cfi-common-9.s: New file. + * testsuite/gas/cfi/cfi.exp: Run new test. +--- +Upstream-Status: Backport +Signed-off-by: Khem Raj