From db95bb7c5946a109e1584ab2c43c052ff39e63bd Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 19 Feb 2015 04:45:27 -0800 Subject: [PATCH] Use nm/readelf with "failif" PR ld/4317 * ld-i386/compressed1.d: Use nm/readelf with "failif". * ld-x86-64/compressed1.d: Likewise. * ld-x86-64/pie1.d: Likewise. --- ld/testsuite/ChangeLog | 7 +++++++ ld/testsuite/ld-i386/compressed1.d | 6 ++++++ ld/testsuite/ld-x86-64/compressed1.d | 6 ++++++ ld/testsuite/ld-x86-64/pie1.d | 6 ++++++ 4 files changed, 25 insertions(+) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 7619bc5..3eb1c99 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2015-02-19 H.J. Lu + + PR ld/4317 + * ld-i386/compressed1.d: Use nm/readelf with "failif". + * ld-x86-64/compressed1.d: Likewise. + * ld-x86-64/pie1.d: Likewise. + 2015-02-19 Alan Modra PR ld/4317 diff --git a/ld/testsuite/ld-i386/compressed1.d b/ld/testsuite/ld-i386/compressed1.d index c17d3c7..e9eeef9 100644 --- a/ld/testsuite/ld-i386/compressed1.d +++ b/ld/testsuite/ld-i386/compressed1.d @@ -2,3 +2,9 @@ #as: --32 #ld: -e foo -melf_i386 --noinhibit-exec #warning: .*/compressed1.c:13: undefined reference to .bar. +#nm: -n + +#failif +#... +[ \t]+U bar +#... diff --git a/ld/testsuite/ld-x86-64/compressed1.d b/ld/testsuite/ld-x86-64/compressed1.d index 9e9d92c..f97c9ad 100644 --- a/ld/testsuite/ld-x86-64/compressed1.d +++ b/ld/testsuite/ld-x86-64/compressed1.d @@ -2,3 +2,9 @@ #as: --64 #ld: -e foo -melf_x86_64 --noinhibit-exec #warning: .*/compressed1.c:13: undefined reference to .bar. +#nm: -n + +#failif +#... +[ \t]+U bar +#... diff --git a/ld/testsuite/ld-x86-64/pie1.d b/ld/testsuite/ld-x86-64/pie1.d index 368d153..6373eea 100644 --- a/ld/testsuite/ld-x86-64/pie1.d +++ b/ld/testsuite/ld-x86-64/pie1.d @@ -1,4 +1,10 @@ #name: PIE with undefined symbol #as: --64 #ld: -pie -melf_x86_64 --noinhibit-exec +#readelf: -s --wide #warning: \A[^\n]*\.o[^\n]*In function `_start':\n[^\n]*: undefined reference to `foo'\Z + +#failif +#... + +[0-9]+: +[0-9a-f]+ +0 +NOTYPE +GLOBAL +DEFAULT +UND foo +#... -- 2.7.4