This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] info-shared.exp: Replace libs=-ldl with shlib_load


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0a8ddac418d3e8e12a1bb51c3b0da90155f83403

commit 0a8ddac418d3e8e12a1bb51c3b0da90155f83403
Author: Simon Marchi <simon.marchi@ericsson.com>
Date:   Tue Apr 24 10:14:14 2018 -0400

    info-shared.exp: Replace libs=-ldl with shlib_load
    
    As reported in PR 23104, -ldl doesn't work on FreeBSD.  Replace it with
    shlib_load, which adds the right flags for dynamic library loading based
    on the current target platform.
    
    The test still passes on Linux, and should now pass on FreeBSD, though I
    did not test personally.
    
    gdb/testsuite/ChangeLog:
    
    	PR gdb/23104
    	* gdb.base/info-shared.exp: Replace libs=-ldl with shlib_load.

Diff:
---
 gdb/testsuite/ChangeLog                | 5 +++++
 gdb/testsuite/gdb.base/info-shared.exp | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index d5e9429..cb8dd80 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-04-24  Simon Marchi  <simon.marchi@ericsson.com>
+
+	PR gdb/23104
+	* gdb.base/info-shared.exp: Replace libs=-ldl with shlib_load.
+
 2018-04-19  Richard Bunt  <richard.bunt@arm.com>
 
 	* gdb.threads/multiple-successive-infcall.c: New test.
diff --git a/gdb/testsuite/gdb.base/info-shared.exp b/gdb/testsuite/gdb.base/info-shared.exp
index 4ffcb1b..f228f18 100644
--- a/gdb/testsuite/gdb.base/info-shared.exp
+++ b/gdb/testsuite/gdb.base/info-shared.exp
@@ -43,7 +43,7 @@ if { [gdb_compile_shlib $srcfile_lib2 $binfile_lib2 \
 
 set cflags "$define1 $define2"
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
-	  [list additional_flags=$cflags libs=-ldl]] } {
+	  [list additional_flags=$cflags shlib_load]] } {
     return -1
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]