mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 23:57:03 +08:00
Update PR ld/12365 test for GCC 6
PR ld/12365 test is to verify that linker catches the reference to undefined symbol error caused by a GCC bug. Since the GCC bug has been fixed in GCC 6, update the test to verify that there is no reference to undefined symbol in executable * testsuite/ld-plugin/lto.exp: Update PR ld/12365 test for GCC 6.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2016-03-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* testsuite/ld-plugin/lto.exp: Update PR ld/12365 test for GCC 6.
|
||||||
|
|
||||||
2016-03-01 H.J. Lu <hongjiu.lu@intel.com>
|
2016-03-01 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* testsuite/ld-elf/pr19162.d: Skip arc target.
|
* testsuite/ld-elf/pr19162.d: Skip arc target.
|
||||||
|
@ -408,9 +408,20 @@ if { [at_least_gcc_version 4 7] } {
|
|||||||
|| [istarget "x86_64-*-linux*"]
|
|| [istarget "x86_64-*-linux*"]
|
||||||
|| [istarget "amd64-*-linux*"]) } {
|
|| [istarget "amd64-*-linux*"]) } {
|
||||||
set testname "PR ld/12365"
|
set testname "PR ld/12365"
|
||||||
set exec_output [run_host_cmd "$CC" "-O2 -flto -flto-partition=none -fuse-linker-plugin tmpdir/pr12365a.o tmpdir/pr12365b.o tmpdir/pr12365c.o"]
|
set exec_output [run_host_cmd "$CC" "-O2 -flto -flto-partition=none -fuse-linker-plugin -o tmpdir/pr12365 tmpdir/pr12365a.o tmpdir/pr12365b.o tmpdir/pr12365c.o"]
|
||||||
if { [ regexp "undefined reference to `my_bcopy'" $exec_output ] } {
|
if { [ regexp "undefined reference to `my_bcopy'" $exec_output ] } {
|
||||||
|
# Linker should catch the reference to undefined `my_bcopy'
|
||||||
|
# error caused by a GCC bug.
|
||||||
pass $testname
|
pass $testname
|
||||||
|
} elseif { [ string match "" $exec_output ] } {
|
||||||
|
global READELF
|
||||||
|
set exec_output [run_host_cmd "$READELF" "-s -W tmpdir/pr12365"]
|
||||||
|
if { [ regexp "my_bcopy" $exec_output ] } {
|
||||||
|
# Verify that there is no `my_bcopy' symbol in executable.
|
||||||
|
fail $testname
|
||||||
|
} {
|
||||||
|
pass $testname
|
||||||
|
}
|
||||||
} {
|
} {
|
||||||
fail $testname
|
fail $testname
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user