• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

修訂b468caefb6767850023aaa1ce90d1ee6ec9c8829 (tree)
時間2016-03-02 06:18:00
作者H.J. Lu <hjl.tools@gmai...>
CommiterH.J. Lu

Log Message

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

Backport from master

* testsuite/ld-plugin/lto.exp: Update PR ld/12365 test for GCC 6.

Change Summary

差異

--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
1+2016-03-01 H.J. Lu <hongjiu.lu@intel.com>
2+
3+ Backport from master
4+ 2016-03-01 H.J. Lu <hongjiu.lu@intel.com>
5+
6+ * testsuite/ld-plugin/lto.exp: Update PR ld/12365 test for GCC 6.
7+
18 2016-02-26 H.J. Lu <hongjiu.lu@intel.com>
29
310 Backport from master
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -400,9 +400,20 @@ if { [at_least_gcc_version 4 7] } {
400400 || [istarget "x86_64-*-linux*"]
401401 || [istarget "amd64-*-linux*"]) } {
402402 set testname "PR ld/12365"
403- set exec_output [run_host_cmd "$CC" "-O2 -flto -flto-partition=none -fuse-linker-plugin tmpdir/pr12365a.o tmpdir/pr12365b.o tmpdir/pr12365c.o"]
403+ 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"]
404404 if { [ regexp "undefined reference to `my_bcopy'" $exec_output ] } {
405+ # Linker should catch the reference to undefined `my_bcopy'
406+ # error caused by a GCC bug.
405407 pass $testname
408+ } elseif { [ string match "" $exec_output ] } {
409+ global READELF
410+ set exec_output [run_host_cmd "$READELF" "-s -W tmpdir/pr12365"]
411+ if { [ regexp "my_bcopy" $exec_output ] } {
412+ # Verify that there is no `my_bcopy' symbol in executable.
413+ fail $testname
414+ } {
415+ pass $testname
416+ }
406417 } {
407418 fail $testname
408419 }