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.
This commit is contained in:
H.J. Lu 2016-06-12 07:28:58 -07:00
parent 74d7f0aa5b
commit 6d84fed1a0
16 changed files with 58 additions and 40 deletions

View File

@ -1,3 +1,21 @@
2016-06-12 H.J. Lu <hongjiu.lu@intel.com>
* 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 <hongjiu.lu@intel.com>
PR ld/20244

View File

@ -1,7 +1,7 @@
#objdump: -dwrj.text
#target: x86_64-*-*
.*: +file format elf64-x86-64.*
.*: +file format elf.*-x86-64.*
Disassembly of section .text:

View File

@ -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

View File

@ -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]+ <get_func>:
+[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]+ <call_func>:

View File

@ -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

View File

@ -1,7 +1,7 @@
#objdump: -dwrj.text
#target: x86_64-*-*
.*: +file format elf64-x86-64.*
.*: +file format elf.*-x86-64.*
Disassembly of section .text:

View File

@ -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

View File

@ -1,7 +1,7 @@
#objdump: -dwrj.text
#target: x86_64-*-*
.*: +file format elf64-x86-64.*
.*: +file format elf.*-x86-64.*
Disassembly of section .text:

View File

@ -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

View File

@ -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]+ <abort>
#...
[0-9a-f]+ <get_func>:
+[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]+ <call_func>:

View File

@ -1,7 +1,7 @@
#objdump: -dwrj.text
#target: x86_64-*-*
.*: +file format elf64-x86-64.*
.*: +file format elf.*-x86-64.*
Disassembly of section .text:

View File

@ -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

View File

@ -1,7 +1,7 @@
#objdump: -dwrj.text
#target: x86_64-*-*
.*: +file format elf64-x86-64.*
.*: +file format elf.*-x86-64.*
Disassembly of section .text:

View File

@ -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

View File

@ -1,7 +1,7 @@
#objdump: -dwrj.text
#target: x86_64-*-*
.*: +file format elf64-x86-64.*
.*: +file format elf.*-x86-64.*
Disassembly of section .text:

View File

@ -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