From e10c9c620c3335731bb0052987affdc40942fd71 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 1 Sep 2017 06:11:54 -0700 Subject: [PATCH] x86: Correct unwind information for the second PLT For i386, generate unwind information for the second PLT. For x32, correct alignment of .eh_frame section for the second PLT. bfd/ PR ld/22061 * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create .eh_frame section for the second PLT. * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct alignment of .eh_frame section for the second PLT. ld/ PR ld/22061 * testsuite/ld-i386/ibt-plt-1.d: Updated. * testsuite/ld-i386/ibt-plt-2a.d: Likewise. * testsuite/ld-i386/ibt-plt-2c.d: Likewise. * testsuite/ld-i386/ibt-plt-3a.d: Likewise. * testsuite/ld-i386/ibt-plt-3c.d: Likewise. * testsuite/ld-x86-64/ibt-plt-1-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2c-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3c-x32.d: Likewise. * testsuite/ld-i386/ibt-plt-2b.d: Pass --hash-style=sysv to ld and dump unwind information. * testsuite/ld-i386/ibt-plt-2d.d: Likewise. * testsuite/ld-i386/ibt-plt-3b.d: Likewise. * testsuite/ld-i386/ibt-plt-3d.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2b-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2b.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2d-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2d.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3b-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3b.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3d-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3d.d: Likewise. --- bfd/ChangeLog | 8 ++++ bfd/elf32-i386.c | 14 +++++++ bfd/elf64-x86-64.c | 5 ++- ld/ChangeLog | 27 ++++++++++++++ ld/testsuite/ld-i386/ibt-plt-1.d | 2 +- ld/testsuite/ld-i386/ibt-plt-2a.d | 2 +- ld/testsuite/ld-i386/ibt-plt-2b.d | 49 ++++++++++++++++++++++++- ld/testsuite/ld-i386/ibt-plt-2c.d | 2 +- ld/testsuite/ld-i386/ibt-plt-2d.d | 49 ++++++++++++++++++++++++- ld/testsuite/ld-i386/ibt-plt-3a.d | 2 +- ld/testsuite/ld-i386/ibt-plt-3b.d | 48 +++++++++++++++++++++++- ld/testsuite/ld-i386/ibt-plt-3c.d | 2 +- ld/testsuite/ld-i386/ibt-plt-3d.d | 49 ++++++++++++++++++++++++- ld/testsuite/ld-x86-64/ibt-plt-1-x32.d | 8 ++-- ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d | 8 ++-- ld/testsuite/ld-x86-64/ibt-plt-2b-x32.d | 39 +++++++++++++++++++- ld/testsuite/ld-x86-64/ibt-plt-2b.d | 43 +++++++++++++++++++++- ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d | 8 ++-- ld/testsuite/ld-x86-64/ibt-plt-2d-x32.d | 39 +++++++++++++++++++- ld/testsuite/ld-x86-64/ibt-plt-2d.d | 43 +++++++++++++++++++++- ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d | 8 ++-- ld/testsuite/ld-x86-64/ibt-plt-3b-x32.d | 38 ++++++++++++++++++- ld/testsuite/ld-x86-64/ibt-plt-3b.d | 42 ++++++++++++++++++++- ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d | 8 ++-- ld/testsuite/ld-x86-64/ibt-plt-3d-x32.d | 39 +++++++++++++++++++- ld/testsuite/ld-x86-64/ibt-plt-3d.d | 43 +++++++++++++++++++++- 26 files changed, 574 insertions(+), 51 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8c6e8b14f75..20bdf16b291 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2017-09-01 H.J. Lu + + PR ld/22061 + * elf32-i386.c (elf_i386_link_setup_gnu_properties): Create + .eh_frame section for the second PLT. + * elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct + alignment of .eh_frame section for the second PLT. + 2017-09-01 Nick Clifton PR 22059 diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index 7b6d21f8fed..a983301bfba 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -6144,6 +6144,20 @@ error_alignment: htab->plt_got_eh_frame = sec; } + + if (htab->plt_second != NULL) + { + sec = bfd_make_section_anyway_with_flags (dynobj, + ".eh_frame", + flags); + if (sec == NULL) + info->callbacks->einfo (_("%F: failed to create the second PLT .eh_frame section\n")); + + if (!bfd_set_section_alignment (dynobj, sec, 2)) + goto error_alignment; + + htab->plt_second_eh_frame = sec; + } } } diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 0edb17470c4..969a053e0b6 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -6737,9 +6737,10 @@ error_alignment: ".eh_frame", flags); if (sec == NULL) - info->callbacks->einfo (_("%F: failed to create BND PLT .eh_frame section\n")); + info->callbacks->einfo (_("%F: failed to create the second PLT .eh_frame section\n")); - if (!bfd_set_section_alignment (dynobj, sec, 3)) + if (!bfd_set_section_alignment (dynobj, sec, + ABI_64_P (dynobj) ? 3 : 2)) goto error_alignment; htab->plt_second_eh_frame = sec; diff --git a/ld/ChangeLog b/ld/ChangeLog index 418fbb05409..b0029ea2cad 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,30 @@ +2017-09-01 H.J. Lu + + PR ld/22061 + * testsuite/ld-i386/ibt-plt-1.d: Updated. + * testsuite/ld-i386/ibt-plt-2a.d: Likewise. + * testsuite/ld-i386/ibt-plt-2c.d: Likewise. + * testsuite/ld-i386/ibt-plt-3a.d: Likewise. + * testsuite/ld-i386/ibt-plt-3c.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-1-x32.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-2c-x32.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-3c-x32.d: Likewise. + * testsuite/ld-i386/ibt-plt-2b.d: Pass --hash-style=sysv to ld + and dump unwind information. + * testsuite/ld-i386/ibt-plt-2d.d: Likewise. + * testsuite/ld-i386/ibt-plt-3b.d: Likewise. + * testsuite/ld-i386/ibt-plt-3d.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-2b-x32.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-2b.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-2d-x32.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-2d.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-3b-x32.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-3b.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-3d-x32.d: Likewise. + * testsuite/ld-x86-64/ibt-plt-3d.d: Likewise. + 2017-08-31 H.J. Lu PR ld/22048 diff --git a/ld/testsuite/ld-i386/ibt-plt-1.d b/ld/testsuite/ld-i386/ibt-plt-1.d index 25f259f7c80..a1316753286 100644 --- a/ld/testsuite/ld-i386/ibt-plt-1.d +++ b/ld/testsuite/ld-i386/ibt-plt-1.d @@ -37,7 +37,7 @@ Disassembly of section .text: 0+200 : +[a-f0-9]+: 53 push %ebx +[a-f0-9]+: e8 18 00 00 00 call 21e <__x86.get_pc_thunk.bx> - +[a-f0-9]+: 81 c3 22 11 00 00 add \$0x1122,%ebx + +[a-f0-9]+: 81 c3 36 11 00 00 add \$0x1136,%ebx +[a-f0-9]+: 83 ec 08 sub \$0x8,%esp +[a-f0-9]+: e8 dc ff ff ff call 1f0 +[a-f0-9]+: e8 c7 ff ff ff call 1e0 diff --git a/ld/testsuite/ld-i386/ibt-plt-2a.d b/ld/testsuite/ld-i386/ibt-plt-2a.d index 1857ef893e6..13c6949e0d4 100644 --- a/ld/testsuite/ld-i386/ibt-plt-2a.d +++ b/ld/testsuite/ld-i386/ibt-plt-2a.d @@ -38,7 +38,7 @@ Disassembly of section .text: 0+200 : +[a-f0-9]+: 53 push %ebx +[a-f0-9]+: e8 18 00 00 00 call 21e <__x86.get_pc_thunk.bx> - +[a-f0-9]+: 81 c3 22 11 00 00 add \$0x1122,%ebx + +[a-f0-9]+: 81 c3 36 11 00 00 add \$0x1136,%ebx +[a-f0-9]+: 83 ec 08 sub \$0x8,%esp +[a-f0-9]+: e8 dc ff ff ff call 1f0 +[a-f0-9]+: e8 c7 ff ff ff call 1e0 diff --git a/ld/testsuite/ld-i386/ibt-plt-2b.d b/ld/testsuite/ld-i386/ibt-plt-2b.d index 740b889b98d..90541f19f6d 100644 --- a/ld/testsuite/ld-i386/ibt-plt-2b.d +++ b/ld/testsuite/ld-i386/ibt-plt-2b.d @@ -1,7 +1,52 @@ #source: ibt-plt-2.s #as: --32 -#ld: -shared -m elf_i386 -z ibtplt -#readelf: -n +#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv +#readelf: -n -wf + +Contents of the .eh_frame section: + +0+ 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -4 + Return address column: 8 + Augmentation data: 1b + + DW_CFA_def_cfa: r4 \(esp\) ofs 4 + DW_CFA_offset: r8 \(eip\) at cfa-4 + DW_CFA_nop + DW_CFA_nop + +0+18 0000001c 0000001c FDE cie=00000000 pc=00000200..0000021e + DW_CFA_advance_loc: 1 to 00000201 + DW_CFA_def_cfa_offset: 8 + DW_CFA_offset: r3 \(ebx\) at cfa-8 + DW_CFA_advance_loc: 14 to 0000020f + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 13 to 0000021c + DW_CFA_def_cfa_offset: 8 + DW_CFA_advance_loc: 1 to 0000021d + DW_CFA_restore: r3 \(ebx\) + DW_CFA_def_cfa_offset: 4 + +0+38 00000010 0000003c FDE cie=00000000 pc=0000021e..00000222 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +0+4c 00000020 00000050 FDE cie=00000000 pc=000001b0..000001e0 + DW_CFA_def_cfa_offset: 8 + DW_CFA_advance_loc: 6 to 000001b6 + DW_CFA_def_cfa_offset: 12 + DW_CFA_advance_loc: 10 to 000001c0 + DW_CFA_def_cfa_expression \(DW_OP_breg4 \(esp\): 4; DW_OP_breg8 \(eip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit9; DW_OP_ge; DW_OP_lit2; DW_OP_shl; DW_OP_plus\) + +0+70 00000010 00000074 FDE cie=00000000 pc=000001e0..00000200 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + Displaying notes found in: .note.gnu.property Owner Data size Description diff --git a/ld/testsuite/ld-i386/ibt-plt-2c.d b/ld/testsuite/ld-i386/ibt-plt-2c.d index 68db5586bc2..63f44272212 100644 --- a/ld/testsuite/ld-i386/ibt-plt-2c.d +++ b/ld/testsuite/ld-i386/ibt-plt-2c.d @@ -38,7 +38,7 @@ Disassembly of section .text: 0+200 : +[a-f0-9]+: 53 push %ebx +[a-f0-9]+: e8 18 00 00 00 call 21e <__x86.get_pc_thunk.bx> - +[a-f0-9]+: 81 c3 22 11 00 00 add \$0x1122,%ebx + +[a-f0-9]+: 81 c3 36 11 00 00 add \$0x1136,%ebx +[a-f0-9]+: 83 ec 08 sub \$0x8,%esp +[a-f0-9]+: e8 dc ff ff ff call 1f0 +[a-f0-9]+: e8 c7 ff ff ff call 1e0 diff --git a/ld/testsuite/ld-i386/ibt-plt-2d.d b/ld/testsuite/ld-i386/ibt-plt-2d.d index 3e02a62464e..f57c7e84e34 100644 --- a/ld/testsuite/ld-i386/ibt-plt-2d.d +++ b/ld/testsuite/ld-i386/ibt-plt-2d.d @@ -1,7 +1,52 @@ #source: ibt-plt-2.s #as: --32 -#ld: -shared -m elf_i386 -z ibt -#readelf: -n +#ld: -shared -m elf_i386 -z ibt --hash-style=sysv +#readelf: -n -wf + +Contents of the .eh_frame section: + +0+ 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -4 + Return address column: 8 + Augmentation data: 1b + + DW_CFA_def_cfa: r4 \(esp\) ofs 4 + DW_CFA_offset: r8 \(eip\) at cfa-4 + DW_CFA_nop + DW_CFA_nop + +0+18 0000001c 0000001c FDE cie=00000000 pc=00000200..0000021e + DW_CFA_advance_loc: 1 to 00000201 + DW_CFA_def_cfa_offset: 8 + DW_CFA_offset: r3 \(ebx\) at cfa-8 + DW_CFA_advance_loc: 14 to 0000020f + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 13 to 0000021c + DW_CFA_def_cfa_offset: 8 + DW_CFA_advance_loc: 1 to 0000021d + DW_CFA_restore: r3 \(ebx\) + DW_CFA_def_cfa_offset: 4 + +0+38 00000010 0000003c FDE cie=00000000 pc=0000021e..00000222 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +0+4c 00000020 00000050 FDE cie=00000000 pc=000001b0..000001e0 + DW_CFA_def_cfa_offset: 8 + DW_CFA_advance_loc: 6 to 000001b6 + DW_CFA_def_cfa_offset: 12 + DW_CFA_advance_loc: 10 to 000001c0 + DW_CFA_def_cfa_expression \(DW_OP_breg4 \(esp\): 4; DW_OP_breg8 \(eip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit9; DW_OP_ge; DW_OP_lit2; DW_OP_shl; DW_OP_plus\) + +0+70 00000010 00000074 FDE cie=00000000 pc=000001e0..00000200 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + Displaying notes found in: .note.gnu.property Owner Data size Description diff --git a/ld/testsuite/ld-i386/ibt-plt-3a.d b/ld/testsuite/ld-i386/ibt-plt-3a.d index 61f0cbef0d4..5455c928eb7 100644 --- a/ld/testsuite/ld-i386/ibt-plt-3a.d +++ b/ld/testsuite/ld-i386/ibt-plt-3a.d @@ -38,7 +38,7 @@ Disassembly of section .text: 0+1e0 : +[a-f0-9]+: 53 push %ebx +[a-f0-9]+: e8 18 00 00 00 call 1fe <__x86.get_pc_thunk.bx> - +[a-f0-9]+: 81 c3 06 11 00 00 add \$0x1106,%ebx + +[a-f0-9]+: 81 c3 1a 11 00 00 add \$0x111a,%ebx +[a-f0-9]+: 83 ec 08 sub \$0x8,%esp +[a-f0-9]+: e8 dc ff ff ff call 1d0 +[a-f0-9]+: e8 c7 ff ff ff call 1c0 diff --git a/ld/testsuite/ld-i386/ibt-plt-3b.d b/ld/testsuite/ld-i386/ibt-plt-3b.d index d9b5be231bc..6e6637ff9a2 100644 --- a/ld/testsuite/ld-i386/ibt-plt-3b.d +++ b/ld/testsuite/ld-i386/ibt-plt-3b.d @@ -1,5 +1,49 @@ #source: ibt-plt-3.s #as: --32 -#ld: -shared -m elf_i386 -z ibtplt -#readelf: -n +#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv +#readelf: -wf -n + +Contents of the .eh_frame section: + +0+ 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -4 + Return address column: 8 + Augmentation data: 1b + + DW_CFA_def_cfa: r4 \(esp\) ofs 4 + DW_CFA_offset: r8 \(eip\) at cfa-4 + DW_CFA_nop + DW_CFA_nop + +0+18 0000001c 0000001c FDE cie=00000000 pc=000001e0..000001fe + DW_CFA_advance_loc: 1 to 000001e1 + DW_CFA_def_cfa_offset: 8 + DW_CFA_offset: r3 \(ebx\) at cfa-8 + DW_CFA_advance_loc: 14 to 000001ef + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 13 to 000001fc + DW_CFA_def_cfa_offset: 8 + DW_CFA_advance_loc: 1 to 000001fd + DW_CFA_restore: r3 \(ebx\) + DW_CFA_def_cfa_offset: 4 + +0+38 00000010 0000003c FDE cie=00000000 pc=000001fe..00000202 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +0+4c 00000020 00000050 FDE cie=00000000 pc=00000190..000001c0 + DW_CFA_def_cfa_offset: 8 + DW_CFA_advance_loc: 6 to 00000196 + DW_CFA_def_cfa_offset: 12 + DW_CFA_advance_loc: 10 to 000001a0 + DW_CFA_def_cfa_expression \(DW_OP_breg4 \(esp\): 4; DW_OP_breg8 \(eip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit9; DW_OP_ge; DW_OP_lit2; DW_OP_shl; DW_OP_plus\) + +0+70 00000010 00000074 FDE cie=00000000 pc=000001c0..000001e0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop diff --git a/ld/testsuite/ld-i386/ibt-plt-3c.d b/ld/testsuite/ld-i386/ibt-plt-3c.d index 61f0cbef0d4..5455c928eb7 100644 --- a/ld/testsuite/ld-i386/ibt-plt-3c.d +++ b/ld/testsuite/ld-i386/ibt-plt-3c.d @@ -38,7 +38,7 @@ Disassembly of section .text: 0+1e0 : +[a-f0-9]+: 53 push %ebx +[a-f0-9]+: e8 18 00 00 00 call 1fe <__x86.get_pc_thunk.bx> - +[a-f0-9]+: 81 c3 06 11 00 00 add \$0x1106,%ebx + +[a-f0-9]+: 81 c3 1a 11 00 00 add \$0x111a,%ebx +[a-f0-9]+: 83 ec 08 sub \$0x8,%esp +[a-f0-9]+: e8 dc ff ff ff call 1d0 +[a-f0-9]+: e8 c7 ff ff ff call 1c0 diff --git a/ld/testsuite/ld-i386/ibt-plt-3d.d b/ld/testsuite/ld-i386/ibt-plt-3d.d index 3cf159aba80..1ef91db7fce 100644 --- a/ld/testsuite/ld-i386/ibt-plt-3d.d +++ b/ld/testsuite/ld-i386/ibt-plt-3d.d @@ -1,7 +1,52 @@ #source: ibt-plt-3.s #as: --32 -#ld: -shared -m elf_i386 -z ibt -#readelf: -n +#ld: -shared -m elf_i386 -z ibt --hash-style=sysv +#readelf: -wf -n + +Contents of the .eh_frame section: + +0+ 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -4 + Return address column: 8 + Augmentation data: 1b + + DW_CFA_def_cfa: r4 \(esp\) ofs 4 + DW_CFA_offset: r8 \(eip\) at cfa-4 + DW_CFA_nop + DW_CFA_nop + +0+18 0000001c 0000001c FDE cie=00000000 pc=00000200..0000021e + DW_CFA_advance_loc: 1 to 00000201 + DW_CFA_def_cfa_offset: 8 + DW_CFA_offset: r3 \(ebx\) at cfa-8 + DW_CFA_advance_loc: 14 to 0000020f + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 13 to 0000021c + DW_CFA_def_cfa_offset: 8 + DW_CFA_advance_loc: 1 to 0000021d + DW_CFA_restore: r3 \(ebx\) + DW_CFA_def_cfa_offset: 4 + +0+38 00000010 0000003c FDE cie=00000000 pc=0000021e..00000222 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +0+4c 00000020 00000050 FDE cie=00000000 pc=000001b0..000001e0 + DW_CFA_def_cfa_offset: 8 + DW_CFA_advance_loc: 6 to 000001b6 + DW_CFA_def_cfa_offset: 12 + DW_CFA_advance_loc: 10 to 000001c0 + DW_CFA_def_cfa_expression \(DW_OP_breg4 \(esp\): 4; DW_OP_breg8 \(eip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit9; DW_OP_ge; DW_OP_lit2; DW_OP_shl; DW_OP_plus\) + +0+70 00000010 00000074 FDE cie=00000000 pc=000001e0..00000200 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + Displaying notes found in: .note.gnu.property Owner Data size Description diff --git a/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d index f0ffbc2c672..665eaa5559c 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-1-x32.d @@ -9,8 +9,8 @@ Disassembly of section .plt: 0+1c0 <.plt>: - +[a-f0-9]+: ff 35 6a 01 20 00 pushq 0x20016a\(%rip\) # 200330 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: ff 25 6c 01 20 00 jmpq \*0x20016c\(%rip\) # 200338 <_GLOBAL_OFFSET_TABLE_\+0x10> + +[a-f0-9]+: ff 35 62 01 20 00 pushq 0x200162\(%rip\) # 200328 <_GLOBAL_OFFSET_TABLE_\+0x8> + +[a-f0-9]+: ff 25 64 01 20 00 jmpq \*0x200164\(%rip\) # 200330 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 @@ -25,12 +25,12 @@ Disassembly of section .plt.sec: 0+1f0 : +[a-f0-9]+: f3 0f 1e fa endbr64 - +[a-f0-9]+: ff 25 46 01 20 00 jmpq \*0x200146\(%rip\) # 200340 + +[a-f0-9]+: ff 25 3e 01 20 00 jmpq \*0x20013e\(%rip\) # 200338 +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) 0+200 : +[a-f0-9]+: f3 0f 1e fa endbr64 - +[a-f0-9]+: ff 25 3e 01 20 00 jmpq \*0x20013e\(%rip\) # 200348 + +[a-f0-9]+: ff 25 36 01 20 00 jmpq \*0x200136\(%rip\) # 200340 +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d index 36117d83a9e..3d934b5e678 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d @@ -9,8 +9,8 @@ Disassembly of section .plt: 0+1c0 <.plt>: - +[a-f0-9]+: ff 35 6a 01 20 00 pushq 0x20016a\(%rip\) # 200330 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: ff 25 6c 01 20 00 jmpq \*0x20016c\(%rip\) # 200338 <_GLOBAL_OFFSET_TABLE_\+0x10> + +[a-f0-9]+: ff 35 62 01 20 00 pushq 0x200162\(%rip\) # 200328 <_GLOBAL_OFFSET_TABLE_\+0x8> + +[a-f0-9]+: ff 25 64 01 20 00 jmpq \*0x200164\(%rip\) # 200330 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 @@ -25,12 +25,12 @@ Disassembly of section .plt.sec: 0+1f0 : +[a-f0-9]+: f3 0f 1e fa endbr64 - +[a-f0-9]+: ff 25 46 01 20 00 jmpq \*0x200146\(%rip\) # 200340 + +[a-f0-9]+: ff 25 3e 01 20 00 jmpq \*0x20013e\(%rip\) # 200338 +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) 0+200 : +[a-f0-9]+: f3 0f 1e fa endbr64 - +[a-f0-9]+: ff 25 3e 01 20 00 jmpq \*0x20013e\(%rip\) # 200348 + +[a-f0-9]+: ff 25 36 01 20 00 jmpq \*0x200136\(%rip\) # 200340 +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2b-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-2b-x32.d index e9e5638ea3e..54a708d458b 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2b-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2b-x32.d @@ -1,7 +1,42 @@ #source: ibt-plt-2.s #as: --x32 -#ld: -shared -m elf32_x86_64 -z ibtplt -#readelf: -n +#ld: -shared -m elf32_x86_64 -z ibtplt --hash-style=sysv +#readelf: -n -wf + +Contents of the .eh_frame section: + +0+ 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 16 + Augmentation data: 1b + + DW_CFA_def_cfa: r7 \(rsp\) ofs 8 + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop + +0+18 00000014 0000001c FDE cie=00000000 pc=00000210..00000222 + DW_CFA_advance_loc: 4 to 00000214 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 9 to 0000021d + DW_CFA_def_cfa_offset: 8 + DW_CFA_nop + +0+30 00000020 00000034 FDE cie=00000000 pc=000001c0..000001f0 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 6 to 000001c6 + DW_CFA_def_cfa_offset: 24 + DW_CFA_advance_loc: 10 to 000001d0 + DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit9; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) + +0+54 00000010 00000058 FDE cie=00000000 pc=000001f0..00000210 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + Displaying notes found in: .note.gnu.property Owner Data size Description diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2b.d b/ld/testsuite/ld-x86-64/ibt-plt-2b.d index 604db827459..9cd1462d5ea 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2b.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2b.d @@ -1,7 +1,46 @@ #source: ibt-plt-2.s #as: --64 -defsym __64_bit__=1 -#ld: -shared -m elf_x86_64 -z ibtplt -#readelf: -n +#ld: -shared -m elf_x86_64 -z ibtplt --hash-style=sysv +#readelf: -wf -n + +Contents of the .eh_frame section: + +0+ 0000000000000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 16 + Augmentation data: 1b + + DW_CFA_def_cfa: r7 \(rsp\) ofs 8 + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop + +0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000002e0..00000000000002f2 + DW_CFA_advance_loc: 4 to 00000000000002e4 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 9 to 00000000000002ed + DW_CFA_def_cfa_offset: 8 + DW_CFA_nop + +0+30 0000000000000024 00000034 FDE cie=00000000 pc=0000000000000290..00000000000002c0 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 6 to 0000000000000296 + DW_CFA_def_cfa_offset: 24 + DW_CFA_advance_loc: 10 to 00000000000002a0 + DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit10; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +0+58 0000000000000010 0000005c FDE cie=00000000 pc=00000000000002c0..00000000000002e0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + Displaying notes found in: .note.gnu.property Owner Data size Description diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d index ddfbd745cd0..88d6da8995e 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2c-x32.d @@ -9,8 +9,8 @@ Disassembly of section .plt: 0+1c0 <.plt>: - +[a-f0-9]+: ff 35 6a 01 20 00 pushq 0x20016a\(%rip\) # 200330 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: ff 25 6c 01 20 00 jmpq \*0x20016c\(%rip\) # 200338 <_GLOBAL_OFFSET_TABLE_\+0x10> + +[a-f0-9]+: ff 35 62 01 20 00 pushq 0x200162\(%rip\) # 200328 <_GLOBAL_OFFSET_TABLE_\+0x8> + +[a-f0-9]+: ff 25 64 01 20 00 jmpq \*0x200164\(%rip\) # 200330 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 @@ -25,12 +25,12 @@ Disassembly of section .plt.sec: 0+1f0 : +[a-f0-9]+: f3 0f 1e fa endbr64 - +[a-f0-9]+: ff 25 46 01 20 00 jmpq \*0x200146\(%rip\) # 200340 + +[a-f0-9]+: ff 25 3e 01 20 00 jmpq \*0x20013e\(%rip\) # 200338 +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) 0+200 : +[a-f0-9]+: f3 0f 1e fa endbr64 - +[a-f0-9]+: ff 25 3e 01 20 00 jmpq \*0x20013e\(%rip\) # 200348 + +[a-f0-9]+: ff 25 36 01 20 00 jmpq \*0x200136\(%rip\) # 200340 +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2d-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-2d-x32.d index b3be9048d88..f22154a0fd1 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2d-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2d-x32.d @@ -1,7 +1,42 @@ #source: ibt-plt-2.s #as: --x32 -#ld: -shared -m elf32_x86_64 -z ibt -#readelf: -n +#ld: -shared -m elf32_x86_64 -z ibt --hash-style=sysv +#readelf: -n -wf + +Contents of the .eh_frame section: + +0+ 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 16 + Augmentation data: 1b + + DW_CFA_def_cfa: r7 \(rsp\) ofs 8 + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop + +0+18 00000014 0000001c FDE cie=00000000 pc=00000210..00000222 + DW_CFA_advance_loc: 4 to 00000214 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 9 to 0000021d + DW_CFA_def_cfa_offset: 8 + DW_CFA_nop + +0+30 00000020 00000034 FDE cie=00000000 pc=000001c0..000001f0 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 6 to 000001c6 + DW_CFA_def_cfa_offset: 24 + DW_CFA_advance_loc: 10 to 000001d0 + DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit9; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) + +0+54 00000010 00000058 FDE cie=00000000 pc=000001f0..00000210 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + Displaying notes found in: .note.gnu.property Owner Data size Description diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2d.d b/ld/testsuite/ld-x86-64/ibt-plt-2d.d index 7226b695d46..779f754090d 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2d.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2d.d @@ -1,7 +1,46 @@ #source: ibt-plt-2.s #as: --64 -defsym __64_bit__=1 -#ld: -shared -m elf_x86_64 -z ibt -#readelf: -n +#ld: -shared -m elf_x86_64 -z ibt --hash-style=sysv +#readelf: -wf -n + +Contents of the .eh_frame section: + +0+ 0000000000000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 16 + Augmentation data: 1b + + DW_CFA_def_cfa: r7 \(rsp\) ofs 8 + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop + +0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000002e0..00000000000002f2 + DW_CFA_advance_loc: 4 to 00000000000002e4 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 9 to 00000000000002ed + DW_CFA_def_cfa_offset: 8 + DW_CFA_nop + +0+30 0000000000000024 00000034 FDE cie=00000000 pc=0000000000000290..00000000000002c0 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 6 to 0000000000000296 + DW_CFA_def_cfa_offset: 24 + DW_CFA_advance_loc: 10 to 00000000000002a0 + DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit10; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +0+58 0000000000000010 0000005c FDE cie=00000000 pc=00000000000002c0..00000000000002e0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + Displaying notes found in: .note.gnu.property Owner Data size Description diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d index edf29f04475..42136890cc3 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d @@ -9,8 +9,8 @@ Disassembly of section .plt: 0+1a0 <.plt>: - +[a-f0-9]+: ff 35 52 01 20 00 pushq 0x200152\(%rip\) # 2002f8 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: ff 25 54 01 20 00 jmpq \*0x200154\(%rip\) # 200300 <_GLOBAL_OFFSET_TABLE_\+0x10> + +[a-f0-9]+: ff 35 4a 01 20 00 pushq 0x20014a\(%rip\) # 2002f0 <_GLOBAL_OFFSET_TABLE_\+0x8> + +[a-f0-9]+: ff 25 4c 01 20 00 jmpq \*0x20014c\(%rip\) # 2002f8 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 @@ -25,12 +25,12 @@ Disassembly of section .plt.sec: 0+1d0 : +[a-f0-9]+: f3 0f 1e fa endbr64 - +[a-f0-9]+: ff 25 2e 01 20 00 jmpq \*0x20012e\(%rip\) # 200308 + +[a-f0-9]+: ff 25 26 01 20 00 jmpq \*0x200126\(%rip\) # 200300 +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) 0+1e0 : +[a-f0-9]+: f3 0f 1e fa endbr64 - +[a-f0-9]+: ff 25 26 01 20 00 jmpq \*0x200126\(%rip\) # 200310 + +[a-f0-9]+: ff 25 1e 01 20 00 jmpq \*0x20011e\(%rip\) # 200308 +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3b-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-3b-x32.d index fb0a834be5a..e55406f7d87 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3b-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3b-x32.d @@ -1,5 +1,39 @@ #source: ibt-plt-3.s #as: --x32 -#ld: -shared -m elf32_x86_64 -z ibtplt -#readelf: -n +#ld: -shared -m elf32_x86_64 -z ibtplt --hash-style=sysv +#readelf: -wf -n + +Contents of the .eh_frame section: + +0+ 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 16 + Augmentation data: 1b + + DW_CFA_def_cfa: r7 \(rsp\) ofs 8 + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop + +0+18 00000014 0000001c FDE cie=00000000 pc=000001f0..00000202 + DW_CFA_advance_loc: 4 to 000001f4 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 9 to 000001fd + DW_CFA_def_cfa_offset: 8 + DW_CFA_nop + +0+30 00000020 00000034 FDE cie=00000000 pc=000001a0..000001d0 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 6 to 000001a6 + DW_CFA_def_cfa_offset: 24 + DW_CFA_advance_loc: 10 to 000001b0 + DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit9; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) + +0+54 00000010 00000058 FDE cie=00000000 pc=000001d0..000001f0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3b.d b/ld/testsuite/ld-x86-64/ibt-plt-3b.d index 5a3843bc3ab..220371da28d 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3b.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3b.d @@ -1,5 +1,43 @@ #source: ibt-plt-3.s #as: --64 -defsym __64_bit__=1 -#ld: -shared -m elf_x86_64 -z ibtplt -#readelf: -n +#ld: -shared -m elf_x86_64 -z ibtplt --hash-style=sysv +#readelf: -wf -n + +Contents of the .eh_frame section: + +0+ 0000000000000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 16 + Augmentation data: 1b + + DW_CFA_def_cfa: r7 \(rsp\) ofs 8 + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop + +0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000002a0..00000000000002b2 + DW_CFA_advance_loc: 4 to 00000000000002a4 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 9 to 00000000000002ad + DW_CFA_def_cfa_offset: 8 + DW_CFA_nop + +0+30 0000000000000024 00000034 FDE cie=00000000 pc=0000000000000250..0000000000000280 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 6 to 0000000000000256 + DW_CFA_def_cfa_offset: 24 + DW_CFA_advance_loc: 10 to 0000000000000260 + DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit10; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +0+58 0000000000000010 0000005c FDE cie=00000000 pc=0000000000000280..00000000000002a0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d index 85a48791262..2f70d04f722 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3c-x32.d @@ -9,8 +9,8 @@ Disassembly of section .plt: 0+1c0 <.plt>: - +[a-f0-9]+: ff 35 6a 01 20 00 pushq 0x20016a\(%rip\) # 200330 <_GLOBAL_OFFSET_TABLE_\+0x8> - +[a-f0-9]+: ff 25 6c 01 20 00 jmpq \*0x20016c\(%rip\) # 200338 <_GLOBAL_OFFSET_TABLE_\+0x10> + +[a-f0-9]+: ff 35 62 01 20 00 pushq 0x200162\(%rip\) # 200328 <_GLOBAL_OFFSET_TABLE_\+0x8> + +[a-f0-9]+: ff 25 64 01 20 00 jmpq \*0x200164\(%rip\) # 200330 <_GLOBAL_OFFSET_TABLE_\+0x10> +[a-f0-9]+: 0f 1f 40 00 nopl 0x0\(%rax\) +[a-f0-9]+: f3 0f 1e fa endbr64 +[a-f0-9]+: 68 00 00 00 00 pushq \$0x0 @@ -25,12 +25,12 @@ Disassembly of section .plt.sec: 0+1f0 : +[a-f0-9]+: f3 0f 1e fa endbr64 - +[a-f0-9]+: ff 25 46 01 20 00 jmpq \*0x200146\(%rip\) # 200340 + +[a-f0-9]+: ff 25 3e 01 20 00 jmpq \*0x20013e\(%rip\) # 200338 +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) 0+200 : +[a-f0-9]+: f3 0f 1e fa endbr64 - +[a-f0-9]+: ff 25 3e 01 20 00 jmpq \*0x20013e\(%rip\) # 200348 + +[a-f0-9]+: ff 25 36 01 20 00 jmpq \*0x200136\(%rip\) # 200340 +[a-f0-9]+: 66 0f 1f 44 00 00 nopw 0x0\(%rax,%rax,1\) Disassembly of section .text: diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3d-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-3d-x32.d index 447e8116a93..ceaf75a6490 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3d-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3d-x32.d @@ -1,7 +1,42 @@ #source: ibt-plt-3.s #as: --x32 -#ld: -shared -m elf32_x86_64 -z ibt -#readelf: -n +#ld: -shared -m elf32_x86_64 -z ibt --hash-style=sysv +#readelf: -wf -n + +Contents of the .eh_frame section: + +0+ 00000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 16 + Augmentation data: 1b + + DW_CFA_def_cfa: r7 \(rsp\) ofs 8 + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop + +0+18 00000014 0000001c FDE cie=00000000 pc=00000210..00000222 + DW_CFA_advance_loc: 4 to 00000214 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 9 to 0000021d + DW_CFA_def_cfa_offset: 8 + DW_CFA_nop + +0+30 00000020 00000034 FDE cie=00000000 pc=000001c0..000001f0 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 6 to 000001c6 + DW_CFA_def_cfa_offset: 24 + DW_CFA_advance_loc: 10 to 000001d0 + DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit9; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) + +0+54 00000010 00000058 FDE cie=00000000 pc=000001f0..00000210 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + Displaying notes found in: .note.gnu.property Owner Data size Description diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3d.d b/ld/testsuite/ld-x86-64/ibt-plt-3d.d index 342626a4722..d5cade017bb 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3d.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3d.d @@ -1,7 +1,46 @@ #source: ibt-plt-3.s #as: --64 -defsym __64_bit__=1 -#ld: -shared -m elf_x86_64 -z ibt -#readelf: -n +#ld: -shared -m elf_x86_64 -z ibt --hash-style=sysv +#readelf: -wf -n + +Contents of the .eh_frame section: + +0+ 0000000000000014 00000000 CIE + Version: 1 + Augmentation: "zR" + Code alignment factor: 1 + Data alignment factor: -8 + Return address column: 16 + Augmentation data: 1b + + DW_CFA_def_cfa: r7 \(rsp\) ofs 8 + DW_CFA_offset: r16 \(rip\) at cfa-8 + DW_CFA_nop + DW_CFA_nop + +0+18 0000000000000014 0000001c FDE cie=00000000 pc=00000000000002e0..00000000000002f2 + DW_CFA_advance_loc: 4 to 00000000000002e4 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 9 to 00000000000002ed + DW_CFA_def_cfa_offset: 8 + DW_CFA_nop + +0+30 0000000000000024 00000034 FDE cie=00000000 pc=0000000000000290..00000000000002c0 + DW_CFA_def_cfa_offset: 16 + DW_CFA_advance_loc: 6 to 0000000000000296 + DW_CFA_def_cfa_offset: 24 + DW_CFA_advance_loc: 10 to 00000000000002a0 + DW_CFA_def_cfa_expression \(DW_OP_breg7 \(rsp\): 8; DW_OP_breg16 \(rip\): 0; DW_OP_lit15; DW_OP_and; DW_OP_lit10; DW_OP_ge; DW_OP_lit3; DW_OP_shl; DW_OP_plus\) + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + +0+58 0000000000000010 0000005c FDE cie=00000000 pc=00000000000002c0..00000000000002e0 + DW_CFA_nop + DW_CFA_nop + DW_CFA_nop + Displaying notes found in: .note.gnu.property Owner Data size Description -- 2.30.2