aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/shared.exp
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-07-27 10:04:31 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-07-27 10:11:33 -0700
commitc45bd4fd43e5eb0cbad8ec410504e4778c64c65d (patch)
tree437332c0c8c52ca84beec235a45c479088aa01a2 /ld/testsuite/ld-elf/shared.exp
parent077836f7cf6725386c01ae3bb7111663b8f2b85e (diff)
downloadgdb-c45bd4fd43e5eb0cbad8ec410504e4778c64c65d.zip
gdb-c45bd4fd43e5eb0cbad8ec410504e4778c64c65d.tar.gz
gdb-c45bd4fd43e5eb0cbad8ec410504e4778c64c65d.tar.bz2
Check address of versined symbol
Since GCC 5 folds symbol address comparison, assuming each symbol has a different address, &foo == &bar is always false for GCC 5. This patch adds check_ptr_eq if 2 addresses are the same and uses it to check the address of versined symbol. PR ld/18718 * ld-elf/check-ptr-eq.c: New file. * ld-elf/pr18718.c (main): Call check_ptr_eq. * ld-elf/shared.exp: Add check-ptr-eq.c to PR ld/18718 tests.
Diffstat (limited to 'ld/testsuite/ld-elf/shared.exp')
-rw-r--r--ld/testsuite/ld-elf/shared.exp10
1 files changed, 5 insertions, 5 deletions
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 1b6e02f..0076740 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -533,7 +533,7 @@ if { [istarget *-*-linux*]
"Run pr18718" \
"" \
"" \
- { pr18718.c } \
+ { pr18718.c check-ptr-eq.c } \
"pr18718" \
"pass.out" \
"-O2 -I../bfd" \
@@ -542,7 +542,7 @@ if { [istarget *-*-linux*]
"Run pr18718 with PIE (1)" \
"-pie" \
"" \
- { pr18718.c } \
+ { pr18718.c check-ptr-eq.c } \
"pr18718pie1" \
"pass.out" \
"-O2 -fPIE -I../bfd" \
@@ -551,7 +551,7 @@ if { [istarget *-*-linux*]
"Run pr18718 with PIE (2)" \
"" \
"" \
- { pr18718.c } \
+ { pr18718.c check-ptr-eq.c } \
"pr18718pie2" \
"pass.out" \
"-O2 -fPIE -I../bfd" \
@@ -560,7 +560,7 @@ if { [istarget *-*-linux*]
"Run pr18718 with PIC (1)" \
"" \
"" \
- { pr18718.c } \
+ { pr18718.c check-ptr-eq.c } \
"pr18718pic1" \
"pass.out" \
"-O2 -fPIC -I../bfd" \
@@ -569,7 +569,7 @@ if { [istarget *-*-linux*]
"Run pr18718 with PIC (2)" \
"-pie" \
"" \
- { pr18718.c } \
+ { pr18718.c check-ptr-eq.c } \
"pr18718pic2" \
"pass.out" \
"-O2 -fPIC -I../bfd" \