1a405f
--- binutils-2.27.orig/ld/testsuite/ld-plugin/lto.exp	2016-09-20 14:11:51.866711051 +0100
1a405f
+++ binutils-2.27/ld/testsuite/ld-plugin/lto.exp	2016-09-20 14:18:28.528223979 +0100
1a405f
@@ -287,11 +287,21 @@ set lto_link_elf_tests [list \
1a405f
    {dummy.c} {} "pr16746a.exe"] \
1a405f
   [list "PR ld/16746 (2)" \
1a405f
    "-O2 -flto -fuse-linker-plugin tmpdir/pr16746c.o tmpdir/pr16746a.o" "-O2 -flto" \
1a405f
-   {dummy.c} {} "pr16746b.exe"] \
1a405f
+       {dummy.c} {} "pr16746b.exe"] \
1a405f
+]
1a405f
+
1a405f
+# PR 14918 checks that libgcc is not spuriously included in a shared link of
1a405f
+# an empty program.  The ARM crt1.o startup code however calls __libc_csu_init
1a405f
+# in /usr/lib/libc_nonshared.a(elf-init.oS).  This in turn needs
1a405f
+# __aeabi_unwind_cpp_pr0@@GCC_3.5 which is provided by libgcc_s.so.1, so the
1a405f
+# test fails.  Hence this code to skip the test.
1a405f
+if { ! [istarget "arm*-*-*"] } {
1a405f
+    set lto_link_elf_tests [concat $lto_link_elf_tests [list \
1a405f
   [list "PR ld/14918" \
1a405f
    "-flto" "-flto" \
1a405f
    {pr14918.c} {{"readelf" {-d --wide} "pr14918.d"}} "pr14918.exe" "c"] \
1a405f
-]
1a405f
+  ]]
1a405f
+}
1a405f
 
1a405f
 # Check final symbols in executables.
1a405f
 set lto_link_symbol_tests [list \