From 010bc3ce6c651455e3a27c0857021c228780523c Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 8 Jun 2016 10:10:56 -0700 Subject: [PATCH] Support any relocation order * testsuite/ld-x86-64/no-plt-1a.rd: Support any relocation order. * testsuite/ld-x86-64/no-plt-1b.rd: Likewise. * testsuite/ld-x86-64/no-plt-1c.rd: Likewise. * testsuite/ld-x86-64/no-plt-1d.rd: Likewise. * testsuite/ld-x86-64/no-plt-1e.rd: Likewise. * testsuite/ld-x86-64/no-plt-1f.rd: Likewise. * testsuite/ld-x86-64/no-plt-1g.rd: Likewise. * testsuite/ld-x86-64/no-plt.exp: Fix a typo. --- ld/ChangeLog | 11 +++++++++++ ld/testsuite/ld-x86-64/no-plt-1a.rd | 4 ++-- ld/testsuite/ld-x86-64/no-plt-1b.rd | 10 +++++----- ld/testsuite/ld-x86-64/no-plt-1c.rd | 8 ++++---- ld/testsuite/ld-x86-64/no-plt-1e.rd | 4 ++-- ld/testsuite/ld-x86-64/no-plt-1f.rd | 10 +++++----- ld/testsuite/ld-x86-64/no-plt-1g.rd | 8 ++++---- ld/testsuite/ld-x86-64/no-plt.exp | 2 +- 8 files changed, 34 insertions(+), 23 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index ecff7319c9c..f73c01ec312 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,14 @@ +2016-06-08 H.J. Lu + + * testsuite/ld-x86-64/no-plt-1a.rd: Support any relocation order. + * testsuite/ld-x86-64/no-plt-1b.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1c.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1d.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1e.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1f.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1g.rd: Likewise. + * testsuite/ld-x86-64/no-plt.exp: Fix a typo. + 2016-06-08 H.J. Lu * testsuite/ld-x86-64/libno-plt-1b.dd: Likewise. diff --git a/ld/testsuite/ld-x86-64/no-plt-1a.rd b/ld/testsuite/ld-x86-64/no-plt-1a.rd index fd2e00899e9..78c2a752064 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1a.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1a.rd @@ -4,7 +4,7 @@ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|puts).* \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|puts).* \+ 0 #pass diff --git a/ld/testsuite/ld-x86-64/no-plt-1b.rd b/ld/testsuite/ld-x86-64/no-plt-1b.rd index ab1b1af582e..19833b9ca48 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1b.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1b.rd @@ -4,13 +4,13 @@ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ get_func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ call_func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0 #pass diff --git a/ld/testsuite/ld-x86-64/no-plt-1c.rd b/ld/testsuite/ld-x86-64/no-plt-1c.rd index d54913fb057..ebfea3b3aa2 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1c.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1c.rd @@ -4,11 +4,11 @@ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ get_func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ call_func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0 #pass diff --git a/ld/testsuite/ld-x86-64/no-plt-1e.rd b/ld/testsuite/ld-x86-64/no-plt-1e.rd index fd2e00899e9..78c2a752064 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1e.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1e.rd @@ -4,7 +4,7 @@ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|puts).* \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|puts).* \+ 0 #pass diff --git a/ld/testsuite/ld-x86-64/no-plt-1f.rd b/ld/testsuite/ld-x86-64/no-plt-1f.rd index ab1b1af582e..19833b9ca48 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1f.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1f.rd @@ -4,13 +4,13 @@ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ get_func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ call_func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func|func) \+ 0 #pass diff --git a/ld/testsuite/ld-x86-64/no-plt-1g.rd b/ld/testsuite/ld-x86-64/no-plt-1g.rd index d54913fb057..ebfea3b3aa2 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1g.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1g.rd @@ -4,11 +4,11 @@ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ abort.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ puts.* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ get_func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ call_func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort.*|puts.*|get_func|call_func).* \+ 0 #pass diff --git a/ld/testsuite/ld-x86-64/no-plt.exp b/ld/testsuite/ld-x86-64/no-plt.exp index f57e131421d..d57ccb51ce2 100644 --- a/ld/testsuite/ld-x86-64/no-plt.exp +++ b/ld/testsuite/ld-x86-64/no-plt.exp @@ -103,7 +103,7 @@ run_cc_link_tests [list \ "" \ {dummy.s} \ {{readelf -Wr no-plt-1d.rd} {objdump -dwrj.text no-plt-1d.dd}} \ - "no-plt-1a" \ + "no-plt-1d" \ ] \ [list \ "No PLT (PIE 1e)" \ -- 2.30.2