+proc do_pic_relocation_test {} {
+ set testname "picreloc.s: Test for proper PIC relocation (part 2)"
+ set x 0
+
+ # ELF (osf) doesn't really handle extra sections too well...
+ if [istarget hppa*-*-*elf*] then {
+ return;
+ }
+
+ gas_start "picreloc.s" "-al"
+
+ while 1 {
+ expect {
+ -re "^ +\[0-9\]+ 0000 00000004\[^\n\]*\n" { set x [expr $x+1] }
+ -re "\[^\n\]*\n" { }
+ timeout { perror "timeout\n"; break }
+ eof { break }
+ }
+ }
+
+ # This was intended to do any cleanup necessary. It kinda looks like it
+ # isn't needed, but just in case, please keep it in for now.
+ gas_finish
+
+ # Did we find what we were looking for? If not, flunk it.
+ if [expr $x==1] then { pass $testname } else { fail $testname }
+}