diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-11-19 17:32:37 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-11-19 17:32:37 +0000 |
commit | a74add1b914f68c6e7851aa563944e756b3f096e (patch) | |
tree | f86701019c6c4628653a47df7e3cb5a2771dbf7d /toolchain | |
parent | 58f1a4677be0298e2a6701fc2bbf5d34334f394f (diff) | |
download | master-187ad058-a74add1b914f68c6e7851aa563944e756b3f096e.tar.gz master-187ad058-a74add1b914f68c6e7851aa563944e756b3f096e.tar.bz2 master-187ad058-a74add1b914f68c6e7851aa563944e756b3f096e.zip |
[toolchain] binutils/2.22: backport an upstream fix for an assertion in the ARM backend.
See http://sourceware.org/bugzilla/show_bug.cgi?id=13990 for more details.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34260 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/binutils/patches/2.22/500-arm_ld_assert_fix.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/toolchain/binutils/patches/2.22/500-arm_ld_assert_fix.patch b/toolchain/binutils/patches/2.22/500-arm_ld_assert_fix.patch new file mode 100644 index 0000000000..25e26db239 --- /dev/null +++ b/toolchain/binutils/patches/2.22/500-arm_ld_assert_fix.patch @@ -0,0 +1,28 @@ +See http://sourceware.org/bugzilla/show_bug.cgi?id=13990 for details. +--- +diff -u -r1.287 -r1.288 +--- a/bfd/elf32-arm.c 2012/04/24 05:12:31 1.287 ++++ b/bfd/elf32-arm.c 2012/04/24 16:09:12 1.288 +@@ -12256,8 +12256,19 @@ + if (may_need_local_target_p + && elf32_arm_get_plt_info (abfd, eh, r_symndx, &root_plt, &arm_plt)) + { +- BFD_ASSERT (root_plt->refcount > 0); +- root_plt->refcount -= 1; ++ /* If PLT refcount book-keeping is wrong and too low, we'll ++ see a zero value (going to -1) for the root PLT reference ++ count. */ ++ if (root_plt->refcount >= 0) ++ { ++ BFD_ASSERT (root_plt->refcount != 0); ++ root_plt->refcount -= 1; ++ } ++ else ++ /* A value of -1 means the symbol has become local, forced ++ or seeing a hidden definition. Any other negative value ++ is an error. */ ++ BFD_ASSERT (root_plt->refcount == -1); + + if (!call_reloc_p) + arm_plt->noncall_refcount--; + |