+proc build_basefile1_o {} {
+ global CC
+ global CFLAGS
+ global srcdir
+ global subdir
+
+ # Compile the object file.
+ if ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/basefile1.s tmpdir/basefile1.o] {
+ fail "compiling basefile1 object"
+ }
+}
+
+proc run_basefile_test { testname } {
+ global LD
+ global DLLTOOL
+ global srcdir
+ global subdir
+ global verbose
+
+ if ![ld_simple_link "$LD -e start \
+ --base-file=tmpdir/$testname.base \
+ --export-all-symbols" tmpdir/$testname.dll \
+ "tmpdir/basefile1.o"] {
+ fail "linking DLL"
+ return
+ }
+
+ if { $verbose > 2 } then { verbose "output is [file_contents tmpdir/$testname.base]" 3 }
+
+ catch "exec wc -c tmpdir/$testname.base" err
+
+ if ![string match "0 tmpdir/$testname.base" $err] then {
+ send_log "$err\n"
+ if { $verbose == 2 } then { verbose "$err" 2 }
+ fail $testname
+ return
+ }
+
+ pass "$testname"
+}
+