* testsuite/ld-elf/shared.exp: xfail pr22471 for targets that
	complain about relocs in read-only sections.  Tidy ASFLAGS append.
+2021-01-07  Alan Modra  <amodra@gmail.com>
+
+       * testsuite/ld-elf/shared.exp: xfail pr22471 for targets that
+       complain about relocs in read-only sections.  Tidy ASFLAGS append.
+
 2021-01-06  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-sparc/sparc.exp (sparc64tests): Set text-segment
 
 }
 
 if [is_underscore_target] {
-    set ASFLAGS "$ASFLAGS --defsym UNDERSCORE=1"
+    append ASFLAGS " --defsym UNDERSCORE=1"
 }
 
 run_ld_link_tests [list \
        {} \
        "pr22471b.so" \
     ] \
-    [list \
-       "Build pr22471" \
-       "$LFLAGS -rpath-link ." \
-       "tmpdir/pr22471b.so" \
-       "" \
-       {pr22471b.s} \
-       {} \
-       "pr22471" \
-    ] \
     [list \
        "Build pr22649-1.so" \
        "$LFLAGS -shared" \
     ] \
 ]
 
+run_ld_link_tests [list \
+    [list \
+       "Build pr22471" \
+       "$LFLAGS -rpath-link . -rpath-link tmpdir" \
+       "tmpdir/pr22471b.so" \
+       "" \
+       {pr22471b.s} \
+       {} \
+       "pr22471" \
+    ] \
+] bfin-*-* frv-*-* lm32-*-*
+
 if { [check_gc_sections_available] } {
     if [istarget mips*-*-*] {
        set actions {{ld pr22649-2ab-mips.msg}}