diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-03-08 07:42:51 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-03-08 07:42:51 +0000 |
commit | 51898c1516dadb423f80b5c5959f080c18982f37 (patch) | |
tree | 745972e8347eb51fb221625e2963f36e533a05ca /gdb/testsuite/gdb.reverse | |
parent | f4a23d427dc7ac56aa4de7a8d29e899e936ce841 (diff) | |
download | gdb-51898c1516dadb423f80b5c5959f080c18982f37.zip gdb-51898c1516dadb423f80b5c5959f080c18982f37.tar.gz gdb-51898c1516dadb423f80b5c5959f080c18982f37.tar.bz2 |
gdb/testsuite/
Fix false FAIL on distros with relro linkage as default.
* gdb.reverse/solib-precsave.exp: Try to compile the test using
-Wl,-z,norelro first.
Diffstat (limited to 'gdb/testsuite/gdb.reverse')
-rw-r--r-- | gdb/testsuite/gdb.reverse/solib-precsave.exp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.reverse/solib-precsave.exp b/gdb/testsuite/gdb.reverse/solib-precsave.exp index 15da802..ec89f6c 100644 --- a/gdb/testsuite/gdb.reverse/solib-precsave.exp +++ b/gdb/testsuite/gdb.reverse/solib-precsave.exp @@ -39,7 +39,13 @@ if { [gdb_compile_shlib ${srcdir}/${subdir}/${libsrc} ${library} "debug"] != "" set exec_opts [list debug shlib=${library}] -if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opts] != "" } { +# Attempt to prevent -Wl,-z,relro which may happen by default with some +# toolchain configurations. Due to PR corefiles/11804 GDB will then produce +# invalid core file. + +if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable \ + [concat $exec_opts additional_flags=-Wl,-z,norelro]] != "" + && [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opts] != "" } { untested "Could not compile $binfile." return -1 } |