diff options
author | Fathi Boudra <fathi.boudra@linaro.org> | 2014-02-19 09:03:45 +0000 |
---|---|---|
committer | Linaro Code Review <review@review.linaro.org> | 2014-02-19 09:03:45 +0000 |
commit | 197f55a0f231e84effe1efb5cc7e892f1823de68 (patch) | |
tree | bfe2dcffacd85ecacd6daaa251f2ddecf1d351b8 /meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr2404.patch | |
parent | 5ede61537ebe4c5fddd2cfbb0a00c8fdebc01203 (diff) | |
parent | 47f045d168bc66d2183f634ad33f1ea82a2df8d4 (diff) |
Merge "binutils-linaro: Sync patches from OE-Core"
Diffstat (limited to 'meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr2404.patch')
-rw-r--r-- | meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr2404.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr2404.patch b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr2404.patch new file mode 100644 index 0000000..41f3504 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/binutils/binutils-linaro-2.24/fix-pr2404.patch @@ -0,0 +1,76 @@ +From: H.J. Lu <hjl.tools@gmail.com> +Date: Tue, 21 Jan 2014 13:33:48 +0000 (-0800) +Subject: Don't check shared/export_dynamic/ref_dynamic for type mismatch +X-Git-Tag: hjl/linux/release/2.24.51.0.3~1^2~8^2~22 +X-Git-Url: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff_plain;h=22ef172a21663abb477d72284b4d59c8eabcbb82 + +Don't check shared/export_dynamic/ref_dynamic for type mismatch + +There is nothing linker can do when a type mismatched default definition +are made dynamic by info->shared, info->export_dynamic or h->ref_dynamic. +But we do want to avoid exporting it when building PIE. Let's remove +those checks. + +bfd/ + + PR ld/2404 + * elflink.c (_bfd_elf_merge_symbol): Don't check info->shared, + info->export_dynamic, nor !h->ref_dynamic for type mismatch when + adding the default version. + +ld/testsuite/ + + PR ld/2404 + * ld-elf/shared.exp: Add a PIE test for PR ld/2404. + +Upstream-Status: Backport +--- + +Index: binutils-2.24/bfd/elflink.c +=================================================================== +--- binutils-2.24.orig/bfd/elflink.c 2014-02-08 13:20:08.628378267 +0000 ++++ binutils-2.24/bfd/elflink.c 2014-02-08 13:20:08.624378267 +0000 +@@ -1090,9 +1090,6 @@ + the type of existing regular definition mismatch. We only do it + if the existing regular definition won't be dynamic. */ + if (pold_alignment == NULL +- && !info->shared +- && !info->export_dynamic +- && !h->ref_dynamic + && newdyn + && newdef + && !olddyn +Index: binutils-2.24/ld/testsuite/ld-elf/shared.exp +=================================================================== +--- binutils-2.24.orig/ld/testsuite/ld-elf/shared.exp 2014-02-08 13:20:08.628378267 +0000 ++++ binutils-2.24/ld/testsuite/ld-elf/shared.exp 2014-02-08 13:20:08.624378267 +0000 +@@ -432,3 +432,29 @@ + + run_cc_link_tests $build_cxx_tests + run_ld_link_exec_tests [] $run_cxx_tests ++ ++if { [istarget *-*-linux*] ++ || [istarget *-*-nacl*] ++ || [istarget *-*-gnu*] } { ++ run_cc_link_tests [list \ ++ [list \ ++ "Build libpr2404b.a with PIE" \ ++ "" \ ++ "-fPIE" \ ++ { pr2404b.c } \ ++ {} \ ++ "libpr2404b.a" \ ++ ] \ ++ ] ++ run_ld_link_exec_tests [] [list \ ++ [list \ ++ "Run pr2404 with PIE" \ ++ "-pie tmpdir/pr2404b.o tmpdir/libpr2404a.so" \ ++ "" \ ++ { dummy.c } \ ++ "pr2404pie" \ ++ "pr2404.out" \ ++ "-fPIE" \ ++ ] \ ++ ] ++} |