From: H.J. Lu Date: Sun, 12 Jun 2016 14:28:58 +0000 (-0700) Subject: Update x86-64 no-PLT tests for x32 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d84fed1a0e39acec9283e7aabfa6c9bbce9fa5d;p=binutils-gdb.git Update x86-64 no-PLT tests for x32 X32 has different output formats for readelf and objdump as well as a different conversion of load symbol address via GOT. * testsuite/ld-x86-64/libno-plt-1b.dd: Updated for x32. * testsuite/ld-x86-64/libno-plt-1b.rd: Likewise. * testsuite/ld-x86-64/no-plt-1a.dd: Likewise. * testsuite/ld-x86-64/no-plt-1a.rd: Likewise. * testsuite/ld-x86-64/no-plt-1b.dd: Likewise. * testsuite/ld-x86-64/no-plt-1b.rd: Likewise. * testsuite/ld-x86-64/no-plt-1c.dd: Likewise. * testsuite/ld-x86-64/no-plt-1c.rd: Likewise. * testsuite/ld-x86-64/no-plt-1d.dd: Likewise. * testsuite/ld-x86-64/no-plt-1e.dd: Likewise. * testsuite/ld-x86-64/no-plt-1e.rd: Likewise. * testsuite/ld-x86-64/no-plt-1f.dd: Likewise. * testsuite/ld-x86-64/no-plt-1f.rd: Likewise. * testsuite/ld-x86-64/no-plt-1g.dd: Likewise. * testsuite/ld-x86-64/no-plt-1g.rd: Likewise. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 4a74c8f7aa2..05f490ae926 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,21 @@ +2016-06-12 H.J. Lu + + * testsuite/ld-x86-64/libno-plt-1b.dd: Updated for x32. + * testsuite/ld-x86-64/libno-plt-1b.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1a.dd: Likewise. + * testsuite/ld-x86-64/no-plt-1a.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1b.dd: Likewise. + * testsuite/ld-x86-64/no-plt-1b.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1c.dd: Likewise. + * testsuite/ld-x86-64/no-plt-1c.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1d.dd: Likewise. + * testsuite/ld-x86-64/no-plt-1e.dd: Likewise. + * testsuite/ld-x86-64/no-plt-1e.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1f.dd: Likewise. + * testsuite/ld-x86-64/no-plt-1f.rd: Likewise. + * testsuite/ld-x86-64/no-plt-1g.dd: Likewise. + * testsuite/ld-x86-64/no-plt-1g.rd: Likewise. + 2016-06-11 H.J. Lu PR ld/20244 diff --git a/ld/testsuite/ld-x86-64/libno-plt-1b.dd b/ld/testsuite/ld-x86-64/libno-plt-1b.dd index c58ede452e3..2892ce42450 100644 --- a/ld/testsuite/ld-x86-64/libno-plt-1b.dd +++ b/ld/testsuite/ld-x86-64/libno-plt-1b.dd @@ -1,7 +1,7 @@ #objdump: -dwrj.text #target: x86_64-*-* -.*: +file format elf64-x86-64.* +.*: +file format elf.*-x86-64.* Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/libno-plt-1b.rd b/ld/testsuite/ld-x86-64/libno-plt-1b.rd index fa415fd8e73..954e4a54845 100644 --- a/ld/testsuite/ld-x86-64/libno-plt-1b.rd +++ b/ld/testsuite/ld-x86-64/libno-plt-1b.rd @@ -2,7 +2,7 @@ #target: x86_64-*-* Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: - +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend + +Offset +Info +Type +Sym.* Value +Symbol's Name \+ Addend #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ func \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ +func \+ 0 #pass diff --git a/ld/testsuite/ld-x86-64/no-plt-1a.dd b/ld/testsuite/ld-x86-64/no-plt-1a.dd index 81b62b09c98..b2721e33bae 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1a.dd +++ b/ld/testsuite/ld-x86-64/no-plt-1a.dd @@ -1,7 +1,7 @@ #objdump: -dwrj.text #target: x86_64-*-* -.*: +file format elf64-x86-64.* +.*: +file format elf.*-x86-64.* Disassembly of section .text: @@ -23,7 +23,7 @@ Disassembly of section .text: +[a-f0-9]+: ff 15 ([0-9a-f]{2} ){4}[ ]+callq \*0x[0-9a-f]+\(%rip\) +# [0-9a-f]+ <_DYNAMIC\+0x[0-9a-f]+> #... [0-9a-f]+ : - +[a-f0-9]+: 48 c7 c0 ([0-9a-f]{2} ){4}[ ]+mov \$0x[0-9a-f]+,%rax + +[a-f0-9]+: 4(0|8) c7 c0 ([0-9a-f]{2} ){4}[ ]+(rex |)mov +\$0x[0-9a-f]+,%(e|r)ax +[a-f0-9]+: c3 retq #... [0-9a-f]+ : diff --git a/ld/testsuite/ld-x86-64/no-plt-1a.rd b/ld/testsuite/ld-x86-64/no-plt-1a.rd index 78c2a752064..73365342d00 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1a.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1a.rd @@ -2,9 +2,9 @@ #target: x86_64-*-* Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: - +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend + +Offset +Info +Type +Sym.* Value +Symbol's Name \+ Addend #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|puts).* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ +(abort|puts).* \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|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.dd b/ld/testsuite/ld-x86-64/no-plt-1b.dd index 5662a2fca03..ccdc4896b61 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1b.dd +++ b/ld/testsuite/ld-x86-64/no-plt-1b.dd @@ -1,7 +1,7 @@ #objdump: -dwrj.text #target: x86_64-*-* -.*: +file format elf64-x86-64.* +.*: +file format elf.*-x86-64.* Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/no-plt-1b.rd b/ld/testsuite/ld-x86-64/no-plt-1b.rd index 19833b9ca48..3e6ad0a83fc 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1b.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1b.rd @@ -2,15 +2,15 @@ #target: x86_64-*-* Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: - +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend + +Offset +Info +Type +Sym.* Value +Symbol's Name \+ Addend #... -[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+ +(abort.*|puts.*|get_func|call_func|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+ +(abort.*|puts.*|get_func|call_func|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+ +(abort.*|puts.*|get_func|call_func|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+ +(abort.*|puts.*|get_func|call_func|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+ +(abort.*|puts.*|get_func|call_func|func) \+ 0 #pass diff --git a/ld/testsuite/ld-x86-64/no-plt-1c.dd b/ld/testsuite/ld-x86-64/no-plt-1c.dd index 197359ee135..2e09a6099e7 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1c.dd +++ b/ld/testsuite/ld-x86-64/no-plt-1c.dd @@ -1,7 +1,7 @@ #objdump: -dwrj.text #target: x86_64-*-* -.*: +file format elf64-x86-64.* +.*: +file format elf.*-x86-64.* Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/no-plt-1c.rd b/ld/testsuite/ld-x86-64/no-plt-1c.rd index ebfea3b3aa2..2c9ef0c3a01 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1c.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1c.rd @@ -2,13 +2,13 @@ #target: x86_64-*-* Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: - +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend + +Offset +Info +Type +Sym.* Value +Symbol's Name \+ Addend #... -[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+ +(abort.*|puts.*|get_func|call_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+ +(abort.*|puts.*|get_func|call_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+ +(abort.*|puts.*|get_func|call_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+ +(abort.*|puts.*|get_func|call_func).* \+ 0 #pass diff --git a/ld/testsuite/ld-x86-64/no-plt-1d.dd b/ld/testsuite/ld-x86-64/no-plt-1d.dd index 375de617268..1920a13e854 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1d.dd +++ b/ld/testsuite/ld-x86-64/no-plt-1d.dd @@ -1,7 +1,7 @@ #objdump: -dwrj.text #target: x86_64-*-* -.*: +file format elf64-x86-64.* +.*: +file format elf.*-x86-64.* Disassembly of section .text: @@ -24,7 +24,7 @@ Disassembly of section .text: +[a-f0-9]+: 67 e8 ([0-9a-f]{2} ){4}[ ]+addr32 callq [0-9a-f]+ #... [0-9a-f]+ : - +[a-f0-9]+: 48 c7 c0 ([0-9a-f]{2} ){4}[ ]+mov \$0x[0-9a-f]+,%rax + +[a-f0-9]+: 4(0|8) c7 c0 ([0-9a-f]{2} ){4}[ ]+(rex |)mov +\$0x[0-9a-f]+,%(e|r)ax +[a-f0-9]+: c3 retq #... [0-9a-f]+ : diff --git a/ld/testsuite/ld-x86-64/no-plt-1e.dd b/ld/testsuite/ld-x86-64/no-plt-1e.dd index c4b948d8522..b0342de6d60 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1e.dd +++ b/ld/testsuite/ld-x86-64/no-plt-1e.dd @@ -1,7 +1,7 @@ #objdump: -dwrj.text #target: x86_64-*-* -.*: +file format elf64-x86-64.* +.*: +file format elf.*-x86-64.* Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/no-plt-1e.rd b/ld/testsuite/ld-x86-64/no-plt-1e.rd index 78c2a752064..73365342d00 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1e.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1e.rd @@ -2,9 +2,9 @@ #target: x86_64-*-* Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: - +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend + +Offset +Info +Type +Sym.* Value +Symbol's Name \+ Addend #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|puts).* \+ 0 +[0-9a-f ]+R_X86_64_GLOB_DAT +0+ +(abort|puts).* \+ 0 #... -[0-9a-f ]+R_X86_64_GLOB_DAT +0+ (abort|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.dd b/ld/testsuite/ld-x86-64/no-plt-1f.dd index 5662a2fca03..ccdc4896b61 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1f.dd +++ b/ld/testsuite/ld-x86-64/no-plt-1f.dd @@ -1,7 +1,7 @@ #objdump: -dwrj.text #target: x86_64-*-* -.*: +file format elf64-x86-64.* +.*: +file format elf.*-x86-64.* Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/no-plt-1f.rd b/ld/testsuite/ld-x86-64/no-plt-1f.rd index 19833b9ca48..3e6ad0a83fc 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1f.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1f.rd @@ -2,15 +2,15 @@ #target: x86_64-*-* Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: - +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend + +Offset +Info +Type +Sym.* Value +Symbol's Name \+ Addend #... -[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+ +(abort.*|puts.*|get_func|call_func|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+ +(abort.*|puts.*|get_func|call_func|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+ +(abort.*|puts.*|get_func|call_func|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+ +(abort.*|puts.*|get_func|call_func|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+ +(abort.*|puts.*|get_func|call_func|func) \+ 0 #pass diff --git a/ld/testsuite/ld-x86-64/no-plt-1g.dd b/ld/testsuite/ld-x86-64/no-plt-1g.dd index 00ae97b4864..0c9709753f6 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1g.dd +++ b/ld/testsuite/ld-x86-64/no-plt-1g.dd @@ -1,7 +1,7 @@ #objdump: -dwrj.text #target: x86_64-*-* -.*: +file format elf64-x86-64.* +.*: +file format elf.*-x86-64.* Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/no-plt-1g.rd b/ld/testsuite/ld-x86-64/no-plt-1g.rd index ebfea3b3aa2..2c9ef0c3a01 100644 --- a/ld/testsuite/ld-x86-64/no-plt-1g.rd +++ b/ld/testsuite/ld-x86-64/no-plt-1g.rd @@ -2,13 +2,13 @@ #target: x86_64-*-* Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains [0-9]+ entries: - +Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend + +Offset +Info +Type +Sym.* Value +Symbol's Name \+ Addend #... -[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+ +(abort.*|puts.*|get_func|call_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+ +(abort.*|puts.*|get_func|call_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+ +(abort.*|puts.*|get_func|call_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+ +(abort.*|puts.*|get_func|call_func).* \+ 0 #pass