diff options
author | Jakub Jelinek <jakub@redhat.com> | 2011-06-20 13:18:52 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2011-06-20 13:18:52 +0000 |
commit | e41b3a13792f24506443962d82207466bf9b9e39 (patch) | |
tree | 583e921340ccca5bb5bf50e7833d2e579f575b80 /ld/testsuite/ld-x86-64 | |
parent | b47d265edba0a7f45ffd3a9952806e124364368b (diff) | |
download | gdb-e41b3a13792f24506443962d82207466bf9b9e39.zip gdb-e41b3a13792f24506443962d82207466bf9b9e39.tar.gz gdb-e41b3a13792f24506443962d82207466bf9b9e39.tar.bz2 |
PR ld/12570
include/
* bfdlink.h (struct bfd_link_info): Add no_ld_generated_unwind_info
option.
ld/
* emultempl/elf32.em (OPTION_LD_GENERATED_UNWIND_INFO,
OPTION_NO_LD_GENERATED_UNWIND_INFO): Define.
(gld${EMULATION_NAME}_handle_option): Handle
--ld-generated-unwind-info and --no-ld-generated-unwind-info.
* ld.texinfo (--ld-generated-unwind-info,
--no-ld-generated-unwind-info): Document.
bfd/
* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
at all for linker created .eh_frame sections.
(_bfd_elf_discard_section_eh_frame): Handle linker created
.eh_frame sections with no relocations.
* elf64-x86-64.c: Include dwarf2.h.
(elf_x86_64_eh_frame_plt): New variable.
(PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
PLT_FDE_LEN_OFFSET): Define.
(struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
(elf_x86_64_create_dynamic_sections): Create and fill in
.eh_frame section for .plt section.
(elf_x86_64_size_dynamic_sections): Write .plt section size
into .eh_frame FDE covering .plt section.
(elf_x86_64_finish_dynamic_sections): Write .plt section
start into .eh_frame FDE covering .plt section. Call
_bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
(elf_backend_plt_alignment): Define to 4.
* elf32-i386.c: Include dwarf2.h.
(elf_i386_eh_frame_plt): New variable.
(PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
PLT_FDE_LEN_OFFSET): Define.
(struct elf_i386_link_hash_table): Add plt_eh_frame field.
(elf_i386_create_dynamic_sections): Create and fill in
.eh_frame section for .plt section.
(elf_i386_size_dynamic_sections): Write .plt section size
into .eh_frame FDE covering .plt section.
(elf_i386_finish_dynamic_sections): Write .plt section
start into .eh_frame FDE covering .plt section. Call
_bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
(elf_backend_plt_alignment): Define to 4.
ld/testsuite/
* ld-x86-64/x86-64.exp: Link some testcases with
--no-ld-generated-unwind-info.
* ld-x86-64/tlsbin.rd: Add --no-ld-generated-unwind-info to ld
comment.
* ld-x86-64/tlsdesc.dd: Likewise.
* ld-x86-64/tlspic.dd: Likewise.
* ld-x86-64/tlsdesc.sd: Likewise.
* ld-x86-64/tlspic.rd: Likewise.
* ld-x86-64/tlsbindesc.rd: Likewise.
* ld-x86-64/tlsbindesc.sd: Likewise.
* ld-x86-64/tlsbin.td: Likewise.
* ld-x86-64/tlsdesc.pd: Likewise.
* ld-x86-64/tlsdesc.td: Likewise.
* ld-x86-64/tlsbindesc.dd: Likewise.
* ld-x86-64/tlsbin.dd: Likewise.
* ld-x86-64/tlsgdesc.rd: Likewise.
* ld-x86-64/tlspic.sd: Likewise.
* ld-x86-64/tlsbindesc.td: Likewise.
* ld-x86-64/tlspic.td: Likewise.
* ld-x86-64/tlsbin.sd: Likewise.
* ld-x86-64/ilp32-4.d: Likewise.
* ld-x86-64/tlsgdesc.dd: Add --no-ld-generated-unwind-info to ld
comment. Adjust.
* ld-x86-64/tlsdesc.rd: Likewise.
* ld-x86-64/tlsgd6.dd: Adjust.
* ld-x86-64/tlsgd5.dd: Likewise.
* ld-i386/i386.exp: Link some testcases with
--no-ld-generated-unwind-info.
* ld-i386/tlsbin.rd: Add --no-ld-generated-unwind-info to ld
comment..
* ld-i386/tlsdesc.dd: Likewise.
* ld-i386/tlspic.dd: Likewise.
* ld-i386/tlsdesc.sd: Likewise.
* ld-i386/tlsgdesc.dd: Likewise.
* ld-i386/tlsnopic.sd: Likewise.
* ld-i386/tlspic.rd: Likewise.
* ld-i386/tlsdesc.rd: Likewise.
* ld-i386/tlsbindesc.rd: Likewise.
* ld-i386/tlsbindesc.sd: Likewise.
* ld-i386/tlsbin.td: Likewise.
* ld-i386/tlsdesc.td: Likewise.
* ld-i386/tlsnopic.dd: Likewise.
* ld-i386/tlsbindesc.dd: Likewise.
* ld-i386/tlsbin.dd: Likewise.
* ld-i386/tlsgdesc.rd: Likewise.
* ld-i386/tlspic.sd: Likewise.
* ld-i386/tlsnopic.rd: Likewise.
* ld-i386/tlsbindesc.td: Likewise.
* ld-i386/tlspic.td: Likewise.
* ld-i386/tlsbin.sd: Likewise.
Diffstat (limited to 'ld/testsuite/ld-x86-64')
23 files changed, 49 insertions, 44 deletions
diff --git a/ld/testsuite/ld-x86-64/ilp32-4.d b/ld/testsuite/ld-x86-64/ilp32-4.d index e8690b3..84dc7b2 100644 --- a/ld/testsuite/ld-x86-64/ilp32-4.d +++ b/ld/testsuite/ld-x86-64/ilp32-4.d @@ -1,6 +1,6 @@ #source: start.s #as: --x32 -#ld: -m elf32_x86_64 -shared +#ld: -m elf32_x86_64 -shared --no-ld-generated-unwind-info #readelf: -d -S --wide There are 10 section headers, starting at offset 0x22c: diff --git a/ld/testsuite/ld-x86-64/tlsbin.dd b/ld/testsuite/ld-x86-64/tlsbin.dd index b87f34a..5bb5979 100644 --- a/ld/testsuite/ld-x86-64/tlsbin.dd +++ b/ld/testsuite/ld-x86-64/tlsbin.dd @@ -1,7 +1,7 @@ #source: tlsbinpic.s #source: tlsbin.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -drj.text #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsbin.rd b/ld/testsuite/ld-x86-64/tlsbin.rd index 936f370..9bfa3cc 100644 --- a/ld/testsuite/ld-x86-64/tlsbin.rd +++ b/ld/testsuite/ld-x86-64/tlsbin.rd @@ -1,7 +1,7 @@ #source: tlsbinpic.s #source: tlsbin.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #readelf: -WSsrl #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsbin.sd b/ld/testsuite/ld-x86-64/tlsbin.sd index 050e595..7fa7904 100644 --- a/ld/testsuite/ld-x86-64/tlsbin.sd +++ b/ld/testsuite/ld-x86-64/tlsbin.sd @@ -1,7 +1,7 @@ #source: tlsbinpic.s #source: tlsbin.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -sj.got #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsbin.td b/ld/testsuite/ld-x86-64/tlsbin.td index 76736db..6f87a19 100644 --- a/ld/testsuite/ld-x86-64/tlsbin.td +++ b/ld/testsuite/ld-x86-64/tlsbin.td @@ -1,7 +1,7 @@ #source: tlsbinpic.s #source: tlsbin.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -sj.tdata #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsbindesc.dd b/ld/testsuite/ld-x86-64/tlsbindesc.dd index 5157c81..b1cfacb 100644 --- a/ld/testsuite/ld-x86-64/tlsbindesc.dd +++ b/ld/testsuite/ld-x86-64/tlsbindesc.dd @@ -1,7 +1,7 @@ #source: tlsbindesc.s #source: tlsbin.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -drj.text #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsbindesc.rd b/ld/testsuite/ld-x86-64/tlsbindesc.rd index 5f25090..3527495 100644 --- a/ld/testsuite/ld-x86-64/tlsbindesc.rd +++ b/ld/testsuite/ld-x86-64/tlsbindesc.rd @@ -1,7 +1,7 @@ #source: tlsbindesc.s #source: tlsbin.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #readelf: -WSsrl #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsbindesc.sd b/ld/testsuite/ld-x86-64/tlsbindesc.sd index 37fa544..dbea32d 100644 --- a/ld/testsuite/ld-x86-64/tlsbindesc.sd +++ b/ld/testsuite/ld-x86-64/tlsbindesc.sd @@ -1,7 +1,7 @@ #source: tlsbindesc.s #source: tlsbin.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -sj.got #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsbindesc.td b/ld/testsuite/ld-x86-64/tlsbindesc.td index 7f2d572..1dc6c28 100644 --- a/ld/testsuite/ld-x86-64/tlsbindesc.td +++ b/ld/testsuite/ld-x86-64/tlsbindesc.td @@ -1,7 +1,7 @@ #source: tlsbindesc.s #source: tlsbin.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -sj.tdata #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsdesc.dd b/ld/testsuite/ld-x86-64/tlsdesc.dd index 9b0ae61..2507e42 100644 --- a/ld/testsuite/ld-x86-64/tlsdesc.dd +++ b/ld/testsuite/ld-x86-64/tlsdesc.dd @@ -1,7 +1,7 @@ #source: tlsdesc.s #source: tlspic2.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -drj.text #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsdesc.pd b/ld/testsuite/ld-x86-64/tlsdesc.pd index bf3bc2f..2176576 100644 --- a/ld/testsuite/ld-x86-64/tlsdesc.pd +++ b/ld/testsuite/ld-x86-64/tlsdesc.pd @@ -1,7 +1,7 @@ #source: tlsdesc.s #source: tlspic2.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -drj.plt #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsdesc.rd b/ld/testsuite/ld-x86-64/tlsdesc.rd index 662b639..df8d466 100644 --- a/ld/testsuite/ld-x86-64/tlsdesc.rd +++ b/ld/testsuite/ld-x86-64/tlsdesc.rd @@ -1,7 +1,7 @@ #source: tlsdesc.s #source: tlspic2.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #readelf: -WSsrld #target: x86_64-*-* @@ -15,7 +15,7 @@ Section Headers: +\[[ 0-9]+\] .dynstr +.* +\[[ 0-9]+\] .rela.dyn +.* +\[[ 0-9]+\] .rela.plt +.* - +\[[ 0-9]+\] .plt +PROGBITS +0+450 0+450 0+20 10 +AX +0 +0 +4 + +\[[ 0-9]+\] .plt +PROGBITS +0+450 0+450 0+20 10 +AX +0 +0 +(4|16) +\[[ 0-9]+\] .text +PROGBITS +0+1000 0+1000 0+154 00 +AX +0 +0 4096 +\[[ 0-9]+\] .tdata +PROGBITS +0+201154 0+1154 0+60 00 WAT +0 +0 +1 +\[[ 0-9]+\] .tbss +NOBITS +0+2011b4 0+11b4 0+20 00 WAT +0 +0 +1 diff --git a/ld/testsuite/ld-x86-64/tlsdesc.sd b/ld/testsuite/ld-x86-64/tlsdesc.sd index 7eb474a..89e2a39 100644 --- a/ld/testsuite/ld-x86-64/tlsdesc.sd +++ b/ld/testsuite/ld-x86-64/tlsdesc.sd @@ -1,7 +1,7 @@ #source: tlsdesc.s #source: tlspic2.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -s -j.got -j.got.plt #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsdesc.td b/ld/testsuite/ld-x86-64/tlsdesc.td index 6b8098c..479cb84 100644 --- a/ld/testsuite/ld-x86-64/tlsdesc.td +++ b/ld/testsuite/ld-x86-64/tlsdesc.td @@ -1,7 +1,7 @@ #source: tlsdesc.s #source: tlspic2.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -sj.tdata #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlsgd5.dd b/ld/testsuite/ld-x86-64/tlsgd5.dd index 7ca953a..ad9cd6e 100644 --- a/ld/testsuite/ld-x86-64/tlsgd5.dd +++ b/ld/testsuite/ld-x86-64/tlsgd5.dd @@ -10,5 +10,5 @@ Disassembly of section .text: [a-f0-9]+ <_start>: [ ]*[a-f0-9]+: 64 48 8b 04 25 00 00 00 00 mov %fs:0x0,%rax -[ ]*[a-f0-9]+: 48 03 05 00 01 20 00 add 0x200100\(%rip\),%rax # 600368 <_DYNAMIC\+0x100> +[ ]*[a-f0-9]+: 48 03 05 40 01 20 00 add 0x200140\(%rip\),%rax # 6003a8 <_DYNAMIC\+0x100> #pass diff --git a/ld/testsuite/ld-x86-64/tlsgd6.dd b/ld/testsuite/ld-x86-64/tlsgd6.dd index e1d8238..8bdb468 100644 --- a/ld/testsuite/ld-x86-64/tlsgd6.dd +++ b/ld/testsuite/ld-x86-64/tlsgd6.dd @@ -10,5 +10,5 @@ Disassembly of section .text: [a-f0-9]+ <_start>: [ ]*[a-f0-9]+: 64 8b 04 25 00 00 00 00 mov %fs:0x0,%eax -[ ]*[a-f0-9]+: 48 03 05 81 00 20 00 add 0x200081\(%rip\),%rax # 60022c <_DYNAMIC\+0x80> +[ ]*[a-f0-9]+: 48 03 05 c5 00 20 00 add 0x2000c5\(%rip\),%rax # 600270 <_DYNAMIC\+0x80> #pass diff --git a/ld/testsuite/ld-x86-64/tlsgdesc.dd b/ld/testsuite/ld-x86-64/tlsgdesc.dd index 75e8da4..fa467a5 100644 --- a/ld/testsuite/ld-x86-64/tlsgdesc.dd +++ b/ld/testsuite/ld-x86-64/tlsgdesc.dd @@ -1,6 +1,6 @@ #source: tlsgdesc.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -drj.text #target: x86_64-*-* @@ -20,7 +20,7 @@ Disassembly of section .text: +[0-9a-f]+: 00 00 * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * - +[0-9a-f]+: 48 03 0d 5e 02 20 00[ ]+add 0x20025e\(%rip\),%rcx +# 200660 <.*> + +[0-9a-f]+: 48 03 0d 5e 02 20 00[ ]+add 0x20025e\(%rip\),%rcx +# 200668 <.*> # -> R_X86_64_TPOFF64 sG3 +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * @@ -31,14 +31,14 @@ Disassembly of section .text: +[0-9a-f]+: 00 00 * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * - +[0-9a-f]+: 48 03 0d 68 02 20 00[ ]+add 0x200268\(%rip\),%rcx +# 200680 <.*> + +[0-9a-f]+: 48 03 0d 68 02 20 00[ ]+add 0x200268\(%rip\),%rcx +# 200688 <.*> # -> R_X86_64_TPOFF64 sG4 +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * # GD, gd first - +[0-9a-f]+: 66 48 8d 3d 6c 02 20[ ]+data32 lea 0x20026c\(%rip\),%rdi +# 200690 <.*> + +[0-9a-f]+: 66 48 8d 3d 6c 02 20[ ]+data32 lea 0x20026c\(%rip\),%rdi +# 200698 <.*> +[0-9a-f]+: 00 * # -> R_X86_64_DTPMOD64 sG1 +[0-9a-f]+: 66 66 48 e8 9c ff ff[ ]+data32 data32 callq [0-9a-f]+ <.*> @@ -48,7 +48,7 @@ Disassembly of section .text: +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * - +[0-9a-f]+: 48 8d 05 a1 02 20 00[ ]+lea 0x2002a1\(%rip\),%rax +# 2006d8 <.*> + +[0-9a-f]+: 48 8d 05 a1 02 20 00[ ]+lea 0x2002a1\(%rip\),%rax +# 2006e0 <.*> # -> R_X86_64_TLSDESC sG1 +[0-9a-f]+: ff 10[ ]+callq \*\(%rax\) +[0-9a-f]+: 90[ ]+nop * @@ -56,14 +56,14 @@ Disassembly of section .text: +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * # GD, desc first - +[0-9a-f]+: 48 8d 05 84 02 20 00[ ]+lea 0x200284\(%rip\),%rax +# 2006c8 <.*> + +[0-9a-f]+: 48 8d 05 84 02 20 00[ ]+lea 0x200284\(%rip\),%rax +# 2006d0 <.*> # -> R_X86_64_TLSDESC sG2 +[0-9a-f]+: ff 10[ ]+callq \*\(%rax\) +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * - +[0-9a-f]+: 66 48 8d 3d 1e 02 20[ ]+data32 lea 0x20021e\(%rip\),%rdi +# 200670 <.*> + +[0-9a-f]+: 66 48 8d 3d 1e 02 20[ ]+data32 lea 0x20021e\(%rip\),%rdi +# 200678 <.*> +[0-9a-f]+: 00 * # -> R_X86_64_DTPMOD64 sG2 +[0-9a-f]+: 66 66 48 e8 6e ff ff[ ]+data32 data32 callq [0-9a-f]+ <.*> @@ -76,13 +76,13 @@ Disassembly of section .text: # GD -> IE, gd first, after IE use +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax +[0-9a-f]+: 00 00 * - +[0-9a-f]+: 48 03 05 f2 01 20 00[ ]+add 0x2001f2\(%rip\),%rax +# 200660 <.*> + +[0-9a-f]+: 48 03 05 f2 01 20 00[ ]+add 0x2001f2\(%rip\),%rax +# 200668 <.*> # -> R_X86_64_TPOFF64 sG3 +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * - +[0-9a-f]+: 48 8b 05 e7 01 20 00[ ]+mov 0x2001e7\(%rip\),%rax +# 200660 <.*> + +[0-9a-f]+: 48 8b 05 e7 01 20 00[ ]+mov 0x2001e7\(%rip\),%rax +# 200668 <.*> # -> R_X86_64_TPOFF64 sG3 +[0-9a-f]+: 66 90[ ]+xchg %ax,%ax +[0-9a-f]+: 90[ ]+nop * @@ -90,7 +90,7 @@ Disassembly of section .text: +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * # GD -> IE, desc first, after IE use - +[0-9a-f]+: 48 8b 05 fa 01 20 00[ ]+mov 0x2001fa\(%rip\),%rax +# 200680 <.*> + +[0-9a-f]+: 48 8b 05 fa 01 20 00[ ]+mov 0x2001fa\(%rip\),%rax +# 200688 <.*> # -> R_X86_64_TPOFF64 sG4 +[0-9a-f]+: 66 90[ ]+xchg %ax,%ax +[0-9a-f]+: 90[ ]+nop * @@ -99,7 +99,7 @@ Disassembly of section .text: +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax +[0-9a-f]+: 00 00 * - +[0-9a-f]+: 48 03 05 e4 01 20 00[ ]+add 0x2001e4\(%rip\),%rax +# 200680 <.*> + +[0-9a-f]+: 48 03 05 e4 01 20 00[ ]+add 0x2001e4\(%rip\),%rax +# 200688 <.*> # -> R_X86_64_TPOFF64 sG4 +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * @@ -108,13 +108,13 @@ Disassembly of section .text: # GD -> IE, gd first, before IE use +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax +[0-9a-f]+: 00 00 * - +[0-9a-f]+: 48 03 05 b8 01 20 00[ ]+add 0x2001b8\(%rip\),%rax +# 200668 <.*> + +[0-9a-f]+: 48 03 05 b8 01 20 00[ ]+add 0x2001b8\(%rip\),%rax +# 200670 <.*> # -> R_X86_64_TPOFF64 sG5 +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * - +[0-9a-f]+: 48 8b 05 ad 01 20 00[ ]+mov 0x2001ad\(%rip\),%rax +# 200668 <.*> + +[0-9a-f]+: 48 8b 05 ad 01 20 00[ ]+mov 0x2001ad\(%rip\),%rax +# 200670 <.*> # -> R_X86_64_TPOFF64 sG5 +[0-9a-f]+: 66 90[ ]+xchg %ax,%ax +[0-9a-f]+: 90[ ]+nop * @@ -122,7 +122,7 @@ Disassembly of section .text: +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * # GD -> IE, desc first, before IE use - +[0-9a-f]+: 48 8b 05 c0 01 20 00[ ]+mov 0x2001c0\(%rip\),%rax +# 200688 <.*> + +[0-9a-f]+: 48 8b 05 c0 01 20 00[ ]+mov 0x2001c0\(%rip\),%rax +# 200690 <.*> # -> R_X86_64_TPOFF64 sG6 +[0-9a-f]+: 66 90[ ]+xchg %ax,%ax +[0-9a-f]+: 90[ ]+nop * @@ -131,7 +131,7 @@ Disassembly of section .text: +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 64 48 8b 04 25 00 00[ ]+mov %fs:0x0,%rax +[0-9a-f]+: 00 00 * - +[0-9a-f]+: 48 03 05 aa 01 20 00[ ]+add 0x2001aa\(%rip\),%rax +# 200688 <.*> + +[0-9a-f]+: 48 03 05 aa 01 20 00[ ]+add 0x2001aa\(%rip\),%rax +# 200690 <.*> # -> R_X86_64_TPOFF64 sG6 +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * @@ -142,7 +142,7 @@ Disassembly of section .text: +[0-9a-f]+: 00 00 * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * - +[0-9a-f]+: 48 03 0d 74 01 20 00[ ]+add 0x200174\(%rip\),%rcx +# 200668 <.*> + +[0-9a-f]+: 48 03 0d 74 01 20 00[ ]+add 0x200174\(%rip\),%rcx +# 200670 <.*> # -> R_X86_64_TPOFF64 sG5 +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * @@ -153,7 +153,7 @@ Disassembly of section .text: +[0-9a-f]+: 00 00 * +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * - +[0-9a-f]+: 48 03 0d 7e 01 20 00[ ]+add 0x20017e\(%rip\),%rcx +# 200688 <.*> + +[0-9a-f]+: 48 03 0d 7e 01 20 00[ ]+add 0x20017e\(%rip\),%rcx +# 200690 <.*> # -> R_X86_64_TPOFF64 sG6 +[0-9a-f]+: 90[ ]+nop * +[0-9a-f]+: 90[ ]+nop * diff --git a/ld/testsuite/ld-x86-64/tlsgdesc.rd b/ld/testsuite/ld-x86-64/tlsgdesc.rd index 61d2fa8..1e24693 100644 --- a/ld/testsuite/ld-x86-64/tlsgdesc.rd +++ b/ld/testsuite/ld-x86-64/tlsgdesc.rd @@ -1,6 +1,6 @@ #source: tlsgdesc.s #as: --64 -#ld: -shared -melf64_x86_64 +#ld: -shared -melf64_x86_64 --no-ld-generated-unwind-info #readelf: -WSsrl #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlspic.dd b/ld/testsuite/ld-x86-64/tlspic.dd index e1b64fc..6f55456 100644 --- a/ld/testsuite/ld-x86-64/tlspic.dd +++ b/ld/testsuite/ld-x86-64/tlspic.dd @@ -1,7 +1,7 @@ #source: tlspic1.s #source: tlspic2.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -drj.text #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlspic.rd b/ld/testsuite/ld-x86-64/tlspic.rd index 798703e..177f206 100644 --- a/ld/testsuite/ld-x86-64/tlspic.rd +++ b/ld/testsuite/ld-x86-64/tlspic.rd @@ -1,7 +1,7 @@ #source: tlspic1.s #source: tlspic2.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #readelf: -WSsrl #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlspic.sd b/ld/testsuite/ld-x86-64/tlspic.sd index 666c774..36c1b52 100644 --- a/ld/testsuite/ld-x86-64/tlspic.sd +++ b/ld/testsuite/ld-x86-64/tlspic.sd @@ -1,7 +1,7 @@ #source: tlspic1.s #source: tlspic2.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -sj.got #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/tlspic.td b/ld/testsuite/ld-x86-64/tlspic.td index 67eb4f2..36a7f8e 100644 --- a/ld/testsuite/ld-x86-64/tlspic.td +++ b/ld/testsuite/ld-x86-64/tlspic.td @@ -1,7 +1,7 @@ #source: tlspic1.s #source: tlspic2.s #as: --64 -#ld: -shared -melf_x86_64 +#ld: -shared -melf_x86_64 --no-ld-generated-unwind-info #objdump: -sj.tdata #target: x86_64-*-* diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index bd1991a..58e4bc0 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -38,12 +38,14 @@ if { !([istarget "x86_64-*-elf*"] # readelf: Apply readelf options on result. Compare with regex (last arg). set x86_64tests { - {"TLS -fpic -shared transitions" "-shared -melf_x86_64" + {"TLS -fpic -shared transitions" + "-shared -melf_x86_64 --no-ld-generated-unwind-info" "--64" {tlspic1.s tlspic2.s} {{readelf -WSsrl tlspic.rd} {objdump -drj.text tlspic.dd} {objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}} "libtlspic.so"} - {"TLS descriptor -fpic -shared transitions" "-shared -melf_x86_64" + {"TLS descriptor -fpic -shared transitions" + "-shared -melf_x86_64 --no-ld-generated-unwind-info" "--64" {tlsdesc.s tlspic2.s} {{readelf -WSsrld tlsdesc.rd} {objdump -drj.text tlsdesc.dd} {objdump "-s -j.got -j.got.plt" tlsdesc.sd} {objdump -sj.tdata tlsdesc.td} @@ -51,17 +53,20 @@ set x86_64tests { {"Helper shared library" "-shared -melf_x86_64" "--64" {tlslib.s} {} "libtlslib.so"} {"TLS -fpic and -fno-pic exec transitions" - "-melf_x86_64 tmpdir/libtlslib.so" "--64" {tlsbinpic.s tlsbin.s} + "-melf_x86_64 tmpdir/libtlslib.so --no-ld-generated-unwind-info" + "--64" {tlsbinpic.s tlsbin.s} {{readelf -WSsrl tlsbin.rd} {objdump -drj.text tlsbin.dd} {objdump -sj.got tlsbin.sd} {objdump -sj.tdata tlsbin.td}} "tlsbin"} {"TLS descriptor -fpic and -fno-pic exec transitions" - "-melf_x86_64 tmpdir/libtlslib.so" "--64" {tlsbindesc.s tlsbin.s} + "-melf_x86_64 tmpdir/libtlslib.so --no-ld-generated-unwind-info" + "--64" {tlsbindesc.s tlsbin.s} {{readelf -WSsrl tlsbindesc.rd} {objdump -drj.text tlsbindesc.dd} {objdump -sj.got tlsbindesc.sd} {objdump -sj.tdata tlsbindesc.td}} "tlsbindesc"} {"TLS with global dynamic and descriptors" - "-shared -melf_x86_64" "--64" {tlsgdesc.s} + "-shared -melf_x86_64 --no-ld-generated-unwind-info" + "--64" {tlsgdesc.s} {{readelf -WSsrl tlsgdesc.rd} {objdump -drj.text tlsgdesc.dd}} "libtlsgdesc.so"} {"TLS in debug sections" "-melf_x86_64" |