Fix testcase for PR ld/22471
[external/binutils.git] / ld / testsuite / ld-elf / shared.exp
index 7514eb1..99c34be 100644 (file)
@@ -34,6 +34,8 @@ if ![check_shared_lib_support] {
 # Add $NOPIE_CFLAGS and $NOPIE_LDFLAGS if non-PIE is required.
 global NOPIE_CFLAGS NOPIE_LDFLAGS
 
+set old_ASFLAGS $ASFLAGS
+
 # This target requires extra GAS options when building code for shared
 # libraries.
 set AFLAGS_PIC ""
@@ -221,6 +223,8 @@ if { [check_gc_sections_available] } {
     ]
 }
 
+set ASFLAGS $old_ASFLAGS
+
 # Check to see if the C compiler works
 if { [which $CC] == 0 } {
     return