# Expect script for ld-version tests
-# Copyright 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2007
-# Free Software Foundation, Inc.
+# Copyright 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+# 2009 Free Software Foundation, Inc.
#
# This file is part of the GNU Binutils.
#
catch "exec $nm --print-armap $tmpdir/$lib | grep \\\ in\\\ | egrep VERS\\\|bar\\\|foo | sort > $tmpdir/nm.out" exec_output
if [string match "" $exec_output] then {
- catch "exec $diff $tmpdir/nm.out $srcdir/$subdir/$expect" exec_output
+ catch "exec sort $srcdir/$subdir/$expect | $diff $tmpdir/nm.out -" exec_output
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {
pass $test
build_exec "vers4a" vers4.c vers4a "-export-dynamic" "" vers4a.ver vers4a.dsym vers4a.sym
+# Verify that --no-export-dynamic undoes the effect of --export-dynamic.
+setup_xfail "mips*-*-*"
+build_exec "vers4b" vers4.c vers4b "-export-dynamic -Wl,--no-export-dynamic" "" "" "" vers4.sym
+
#
# Try multiple definitions foo@BAR and foo@@BAR and make sure the linker