cyglto_plugin-0.dll
}
foreach plug $plugin_names {
- set plug_so [run_host_cmd $CC_FOR_TARGET "--print-prog-name $plug"]
+ set plug_so [string trim [run_host_cmd $CC_FOR_TARGET "--print-prog-name $plug"]]
if { $plug_so eq $plug } then {
- set plug_so [run_host_cmd $CC_FOR_TARGET "--print-file-name $plug"]
+ set plug_so [string trim [run_host_cmd $CC_FOR_TARGET "--print-file-name $plug"]]
}
if { $plug_so ne $plug } then {
set plug_opt "--plugin $plug_so"
}
set exec_output [run_host_cmd "tmpdir/$exe" ""]
- if {![string match "PASS" $exec_output]} {
+ if {![string match "PASS\n" $exec_output]} {
fail "Run $exe fun undefined"
} else {
pass "Run $exe fun undefined"
if { [string match "*-fPIE*" $cflags]
&& ![string match "*-z nodynamic-undefined-weak*" $ldflags] } {
- set weak_symbol "Weak defined"
+ set weak_symbol "Weak defined\n"
} else {
- set weak_symbol "Weak undefined"
+ set weak_symbol "Weak undefined\n"
}
run_cc_link_tests [list \
0020 7578000c 00000001 0000000a 00000000 ux..............
0030 00000000 00000000 00000012 00000000 ................
0040 00000000 00000002 00000006 00000000 ................
- 0050 0000000e 00000006 000000 ...........
\ No newline at end of file
+ 0050 0000000e 00000006 000000 ...........
0300 54000000 60000000 6c000000 78000000 T...`...l...x...
0310 90000000 9c000000 a8000000 b4000000 ................
0320 c0000000 cc000000 d8000000 e4000000 ................
- 0330 f0000000 fc000000 14010000 2c010000 ............,...
\ No newline at end of file
+ 0330 f0000000 fc000000 14010000 2c010000 ............,...
0350 1c000000 02006776 61723300 12000e11 ......gvar3.....
0360 00000000 08000000 03006776 61723400 ..........gvar4.
0370 12000e11 02000000 00000000 01006d61 ..............ma
- 0380 696e0000 in..
\ No newline at end of file
+ 0380 696e0000 in..
0000 04000000 2e001011 00000000 34000000 ............4...
0010 00000000 01000000 00000000 00000000 ................
0020 02100000 06000000 01000070 726f6332 ...........proc2
- 0030 00f3f2f1 02000600 00000000 ............
\ No newline at end of file
+ 0030 00f3f2f1 02000600 00000000 ............
0300 6f643400 02000600 12001211 00100000 od4.............
0310 20000000 02006c76 61723500 12001211 .....lvar5.....
0320 00100000 12000000 03006c76 61723600 ..........lvar6.
- 0330 00000000 ....
\ No newline at end of file
+ 0330 00000000 ....
01e0 02000600 1e000211 48000000 04020000 ........H.......
01f0 00000000 06000000 01000100 00746875 .............thu
0200 6e6b00f1 02000600 0e005e11 04000000 nk........^.....
- 0210 01000100 02100000 02000600 00000000 ................
\ No newline at end of file
+ 0210 01000100 02100000 02000600 00000000 ................
0070 4d5e0200 8a940200 4b710300 6aa90300 *
0080 0a2c0300 67e10300 4a3d0300 fa460300 *
0090 db020200 ec4e0100 131e0300 fb120300 *
- 00a0 aece0200 1db70100 99a30000 a8010100 *
\ No newline at end of file
+ 00a0 aece0200 1db70100 99a30000 a8010100 *
*: file format binary
Contents of section .data:
- 0000 00100000 00000000 *
\ No newline at end of file
+ 0000 00100000 00000000 *
0480 3a001d15 2a100000 00000000 00000000 :...*...........
0490 27000000 49556e6b 6e6f776e 00517565 '...IUnknown.Que
04a0 7279496e 74657266 61636500 41646452 ryInterface.AddR
- 04b0 65660052 656c6561 736500f1 ef.Release..
\ No newline at end of file
+ 04b0 65660052 656c6561 736500f1 ef.Release..
0000 75cf0100 8d660300 f2a20300 aea00000 *
0010 ef990300 223d0000 d6b60000 24070100 *
0020 7f220100 f6d10200 16100200 010a0300 *
- 0030 0b4f0300 12690300 a56d0300 *
\ No newline at end of file
+ 0030 0b4f0300 12690300 a56d0300 *
*: file format binary
Contents of section .data:
- 0000 00100000 00000000 *
\ No newline at end of file
+ 0000 00100000 00000000 *
00c0 6500f2f1 12000116 00000000 01100000 e...............
00d0 66756e63 3100f2f1 12000116 0b100000 func1...........
00e0 01100000 66756e63 3200f2f1 12000216 ....func2.......
- 00f0 02100000 04100000 6d657468 6f6400f1 ........method..
\ No newline at end of file
+ 00f0 02100000 04100000 6d657468 6f6400f1 ........method..
*: file format binary
Contents of section .data:
- 0000 d4d90000 0c1c0000 *
\ No newline at end of file
+ 0000 d4d90000 0c1c0000 *
*: file format binary
Contents of section .data:
- 0000 00100000 00000000 *
\ No newline at end of file
+ 0000 00100000 00000000 *
Contents of section .data:
0000 0e000516 00000000 666f6f2e 6800f2f1 ........foo.h...
0010 10000716 01100000 01000000 2a000000 ............*...
- 0020 0100 ..
\ No newline at end of file
+ 0020 0100 ..
0210 00000000 00000000 00000000 00000000 ................
0220 00000000 00000000 00000000 00000000 ................
0230 00000000 00000000 00000000 00000000 ................
- 0240 00000000 0c000000 00000000 14000000 ................
\ No newline at end of file
+ 0240 00000000 0c000000 00000000 14000000 ................
Contents of section .data:
0000 12000e11 02000000 08000000 0100666f ..............fo
0010 6f000000 12000e11 00000000 04000000 o...............
- 0020 02006261 72000000 ..bar...
\ No newline at end of file
+ 0020 02006261 72000000 ..bar...
0040 00000000 3d000000 40000040 00000000 ....=...@..@....
0050 00000000 00000000 04000000 00000000 ................
0060 0c000000 40000042 02000000 00000000 ....@..B........
- 0070 00000000 ....
\ No newline at end of file
+ 0070 00000000 ....
0060 04000000 02000080 18000000 02000000 ................
0070 1c000000 08000000 03000080 0c000000 ................
0080 04000080 00000000 01000000 14000000 ................
- 0090 10000000 05000080 ........
\ No newline at end of file
+ 0090 10000000 05000080 ........
0000 f4000000 30000000 06000000 100198ba ....0...........
0010 dcfe1023 45676745 2301efcd ab890000 ...#EggE#.......
0020 0a000000 10013b2a 19087f6e 5d4c4c5d ......;*...n]LL]
- 0030 6e7f0819 2a3b0000 n...*;..
\ No newline at end of file
+ 0030 6e7f0819 2a3b0000 n...*;..
Contents of section .data:
0000 03000300 00000100 02000200 02000000 ................
0010 00000000 04000000 04000000 08000000 ................
- 0020 666f6f00 62617200 62617a00 foo.bar.baz.
\ No newline at end of file
+ 0020 666f6f00 62617200 62617a00 foo.bar.baz.
set exec_output [run_host_cmd "$ld" "-plugin $libdep_plugin -o libdep.exe libdep-main.o -L libdep-a -la -e 0"]
set exec_output [prune_warnings $exec_output]
- set expected_output "got deps for library libdep-a/liba.a: -Llibdep-b -lc"
+ set expected_output "got deps for library libdep-a/liba.a: -Llibdep-b -lc\n"
if ![string match $expected_output $exec_output] then {
fail "$testname: did not get expected output from the linker"
if [string match "" $exec_output] then {
if { [isnative] } {
set exec_output [run_host_cmd "tmpdir/pr28138" ""]
- if [string match "PASS" $exec_output] then {
+ if [string match "PASS\n" $exec_output] then {
pass "PR ld/28138 (build & run)"
} else {
fail "PR ld/28138 (built ok, run failed)"
if { [string match "*-fPIE*" $cflags]
&& ![string match "*nodynamic-undefined-weak*" $ldflags] } {
- set weak_symbol "Weak defined"
+ set weak_symbol "Weak defined\n"
} else {
- set weak_symbol "Weak undefined"
+ set weak_symbol "Weak undefined\n"
}
run_cc_link_tests [list \
set gccflags "$gcc_B_opt $gccflags $ld_L_opt"
if {![info exists gcc_ld_B_opt_tested]} {
set gcc_ld_B_opt_tested 1
- set ld_version_message [run_host_cmd "$ld" "--version"]
+ set ld_version_message [string trim [run_host_cmd "$ld" "--version"]]
set ver "-Wl,--version"
if [check_lto_available] {
set ver "-fno-lto $ver"
}
- set gcc_ld_version_message [run_host_cmd "$prog" "$gccflags $ver"]
+ set gcc_ld_version_message [string trim [run_host_cmd "$prog" "$gccflags $ver"]]
if {[string first $ld_version_message $gcc_ld_version_message] < 0} {
perror "************************************************************************"
perror "Your compiler apparently ignores -B when choosing ld."
perror "Hint: don't configure gcc using --with-ld (or --with-as)"
}
perror "You will not be testing the new ld in many of the following tests."
- set gcc_ld_version [run_host_cmd "$prog" "$gccflags --print-prog-name=ld"]
+ set gcc_ld_version [string trim [run_host_cmd "$prog" "$gccflags --print-prog-name=ld"]]
if {![string match "" $gcc_ld_version] && ![string match "ld" $gcc_ld_version]} {
perror "It seems you will be testing $gcc_ld_version instead."
}
set status [remote_exec host [concat sh -c [list "$prog $gccflags $command 2>&1"]] "" "/dev/null" "ld.tmp"]
remote_upload host "ld.tmp"
set link_output [file_contents "ld.tmp"]
- regsub "\n$" $link_output "" link_output
if { [lindex $status 0] != 0 && [string match "" $link_output] } then {
- append link_output "child process exited abnormally"
+ set link_output "child process exited abnormally"
}
remote_file build delete ld.tmp
remote_file host delete ld.tmp