From: H.J. Lu Date: Thu, 19 Feb 2015 12:45:27 +0000 (-0800) Subject: Use nm/readelf with "failif" X-Git-Tag: users/hjl/linux/release/2.25.51.0.2~2^2~39^2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=db95bb7c5946a109e1584ab2c43c052ff39e63bd;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 7619bc5d96d..3eb1c998b24 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 c17d3c7fce6..e9eeef9ae2a 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 9e9d92cea2c..f97c9ad7da6 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 368d1538f41..6373eea7e04 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 +#...