* 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.
This commit is contained in:
Kai Tietz
2009-10-23 14:53:57 +00:00
parent 6a0fa04300
commit bf201fddaa
10 changed files with 146 additions and 38 deletions

View File

@@ -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.

View File

@@ -0,0 +1,2 @@
EXPORTS
symbol=nothing ==something

View File

@@ -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"
}