diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2016-06-12 07:28:58 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2016-06-12 07:28:58 -0700 |
commit | 6d84fed1a0e39acec9283e7aabfa6c9bbce9fa5d (patch) | |
tree | a2e214bf046ededccf33d8046a267426989695a6 | |
parent | 74d7f0aa5b1e27da215349fb32337e1d83aca7d7 (diff) | |
download | gdb-6d84fed1a0e39acec9283e7aabfa6c9bbce9fa5d.zip gdb-6d84fed1a0e39acec9283e7aabfa6c9bbce9fa5d.tar.gz gdb-6d84fed1a0e39acec9283e7aabfa6c9bbce9fa5d.tar.bz2 |
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.
-rw-r--r-- | ld/ChangeLog | 18 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/libno-plt-1b.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/libno-plt-1b.rd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1a.dd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1a.rd | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1b.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1b.rd | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1c.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1c.rd | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1d.dd | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1e.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1e.rd | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1f.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1f.rd | 12 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1g.dd | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-x86-64/no-plt-1g.rd | 10 |
16 files changed, 58 insertions, 40 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 4a74c8f..05f490a 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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 diff --git a/ld/testsuite/ld-x86-64/libno-plt-1b.dd b/ld/testsuite/ld-x86-64/libno-plt-1b.dd index c58ede4..2892ce4 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 fa415fd..954e4a5 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 81b62b0..b2721e3 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]+ <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>: diff --git a/ld/testsuite/ld-x86-64/no-plt-1a.rd b/ld/testsuite/ld-x86-64/no-plt-1a.rd index 78c2a75..7336534 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 5662a2f..ccdc489 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 19833b9..3e6ad0a 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 197359e..2e09a60 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 ebfea3b..2c9ef0c 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 375de61..1920a13 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]+ <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>: diff --git a/ld/testsuite/ld-x86-64/no-plt-1e.dd b/ld/testsuite/ld-x86-64/no-plt-1e.dd index c4b948d..b0342de 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 78c2a75..7336534 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 5662a2f..ccdc489 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 19833b9..3e6ad0a 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 00ae97b..0c97097 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 ebfea3b..2c9ef0c 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 |