gdb: s390: Correct record/replay of may/mayr insn
[binutils-gdb.git] / ld / testsuite / ld-powerpc / pr28827-1.s
blobb9129843c664aca240eabcfe0e4e0ee19a0f60c0
1 .globl _start
2 .type _start,@function
3 .text
4 _start:
5 .cfi_startproc
6 0:
7 addis 2,12,(.TOC.-0b)@ha
8 addi 2,2,(.TOC.-0b)@l
9 .localentry _start,.-0b
10 mflr 0
11 std 0,16(1)
12 stdu 1,-32(1)
13 .cfi_def_cfa_offset 32
14 .cfi_offset 65, 16
16 .macro call f
17 bl \f
18 nop
19 .endm
21 # 3000 plt calls, giving over 64k in .plt size. With a small .got
22 # this guarantees some plt call stubs can use a 16-bit signed offset
23 # from .TOC. while others need a 32-bit signed offset (and are larger).
25 .irpc t4,012
26 .irpc t3,0123456789
27 .irpc t2,0123456789
28 .irpc t1,0123456789
29 .if \t4
30 call f\t4\t3\t2\t1
31 .elseif \t3
32 call f\t3\t2\t1
33 .elseif \t2
34 call f\t2\t1
35 .else
36 call f\t1
37 .endif
38 .endr
39 .endr
40 .endr
41 .endr
43 addi 1,1,32
44 .cfi_def_cfa_offset 0
45 ld 0,16(1)
46 mtlr 0
47 .cfi_restore 65
48 blr
49 .cfi_endproc
50 .size _start,.-_start
52 # Padding to trigger a stub sizing error with commit 2f83249c13 and
53 # c804c6f98d (relro changes). This particular testcase gives a decrease
54 # in .got to .plt gap after .eh_frame editing, resulting in some plt
55 # call stubs being smaller. If the very last one is smaller the size
56 # error triggers. Arguably, the ppc64 backend should not report an
57 # error for shrinkage. However, the actual PR object files showed an
58 # *increase* in .got to .plt gap after .eh_frame editing, resulting in
59 # some plt call stubs being larger. That hit an assertion failure
60 # when a long branch stub followed the larger plt call stub and
61 # overwrote the end of the plt call stub.
62 # With enough fiddling of this testcase it likely would be possible to
63 # find the right padding here and .eh_frame sizing to trigger an
64 # increase in .got to .plt gap. The point of this testcase is to show
65 # that the .got to .plt gap should not change after sizing.
66 .space 50000
68 # Generate some .eh_frame info that -gc-sections will trim
69 .macro fundef f
70 .section .text.\f,"ax",@progbits
71 .type \f,@function
72 \f:
73 .cfi_startproc
74 blr
75 .cfi_endproc
76 .size \f,.-\f
77 .endm
79 .irpc t2,0123456789
80 .irpc t1,0123456789
81 fundef dummy\t2\t1
82 .endr
83 .endr