aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2009-10-23 14:53:57 +0000
committerKai Tietz <kai.tietz@onevision.com>2009-10-23 14:53:57 +0000
commitbf201fddaaaae8fbd048f6d58b315080f5069b9f (patch)
tree61af7147e3b585fbd897a63f51be9cd3b6055107 /binutils/testsuite
parent6a0fa04300e300a1df9cc137f868a91be3854225 (diff)
downloadgdb-bf201fddaaaae8fbd048f6d58b315080f5069b9f.zip
gdb-bf201fddaaaae8fbd048f6d58b315080f5069b9f.tar.gz
gdb-bf201fddaaaae8fbd048f6d58b315080f5069b9f.tar.bz2
2009-10-23 Kai Tietz <kai.tietz@onevision.com>
* deflex.l: Allow '<' and '>' in ID names. * defparse.y (EQUAL): New token constant. (opt_import_name): New rule for emptry or '==' ID. (expline): Add opt_import_name as last line element. (impline): Likewise. * dlltool.c (ifunct): New member its_name. (export): Likewise. (append_import): Add its_name argument. (defexports): Likewise. (defimport): Likewise. (scan_drectve_symbols): Adjust calls to def_exports. (dump_def_info): Print new optinal import/export table symbol name. (generate_idata_ofile): Use its_name member. (make_one_lib_file): Likewise. (nfunc): Take its_name in account on sort. * dlltool.h (def_exports): Add its_name as argument. (def_import): Likewise. * doc/binutils.texi: Add new def file syntax extension. * deflex.l (EQUAL): Add rule for '=='. * NEWS: Mention new feature. 2009-10-23 Kai Tietz <kai.tietz@onevision.com> * binutils-all/dlltool.exp: Add new test. * binutils-all/alias-2.def: New file.
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/ChangeLog5
-rw-r--r--binutils/testsuite/binutils-all/alias-2.def2
-rw-r--r--binutils/testsuite/binutils-all/dlltool.exp30
3 files changed, 37 insertions, 0 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index 6df00eb..4c5f2b7 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-23 Kai Tietz <kai.tietz@onevision.com>
+
+ * binutils-all/dlltool.exp: Add new test.
+ * binutils-all/alias-2.def: New file.
+
2009-10-18 Vincent Rivière <vincent.riviere@freesbee.fr>
* binutils-all/copy-2.d: Exclude more aout targets.
diff --git a/binutils/testsuite/binutils-all/alias-2.def b/binutils/testsuite/binutils-all/alias-2.def
new file mode 100644
index 0000000..ef41eec
--- /dev/null
+++ b/binutils/testsuite/binutils-all/alias-2.def
@@ -0,0 +1,2 @@
+EXPORTS
+symbol=nothing ==something
diff --git a/binutils/testsuite/binutils-all/dlltool.exp b/binutils/testsuite/binutils-all/dlltool.exp
index e0337f4..e9654ab 100644
--- a/binutils/testsuite/binutils-all/dlltool.exp
+++ b/binutils/testsuite/binutils-all/dlltool.exp
@@ -79,3 +79,33 @@ if [regexp $want $got] then {
} else {
fail "dlltool -p (import name)"
}
+
+verbose "$DLLTOOL -p prefix -l tmpdir/libalias2.a -d $srcdir/$subdir/alias-2.def $dlltool_gas_flag" 1
+catch "exec $DLLTOOL -p prefix -l tmpdir/libalias2.a -d $srcdir/$subdir/alias-2.def $dlltool_gas_flag" err
+
+if ![string match "" $err] then {
+ send_log "$err\n"
+ verbose "$err" 1
+ fail "dlltool -p (execution) alias-2.def"
+ continue
+}
+
+pass "dlltool -p (execution) alias-2.def"
+
+set got [binutils_run $NM "tmpdir/libalias2.a"]
+set want "00000000 I __imp__prefix_symbol.*00000000 T _prefix_symbol.*00000000 I __imp__symbol.*00000000 T _symbol"
+
+if [regexp $want $got] then {
+ pass "dlltool -p (symbol names) alias-2.def"
+} else {
+ fail "dlltool -p (symbol names) alias-2.def"
+}
+
+set got [binutils_run $OBJDUMP "-s -j .idata\$6 tmpdir/libalias2.a"]
+set want "(Contents of section .idata\\\$6:.*\\.\\.something\\..*){2,2}"
+
+if [regexp $want $got] then {
+ pass "dlltool -p (import name) alias-2.def"
+} else {
+ fail "dlltool -p (import name) alias-2.def"
+}