+2020-08-16 Alan Modra <amodra@gmail.com>
+
+ * testsuite/ld-powerpc/inline.s,
+ * testsuite/ld-powerpc/inline-1.d,
+ * testsuite/ld-powerpc/inline-2.d,
+ * testsuite/ld-powerpc/inline-3.d,
+ * testsuite/ld-powerpc/inline-4.d,
+ * testsuite/ld-powerpc/inlinepcrel.s,
+ * testsuite/ld-powerpc/inlinepcrel-1.d,
+ * testsuite/ld-powerpc/inlinepcrel-2.d,
+ * testsuite/ld-powerpc/inlinepcrel-3.d: New tests.
+ * testsuite/ld-powerpc/powerpc.exp: Run them.
+
2020-08-16 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/26389
--- /dev/null
+#source: inline.s
+#as: -a64
+#ld: -melf64ppc -shared --hash-style=gnu
+#objdump: -dr
+
+.*
+
+Disassembly of section \.text:
+
+.*:
+.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (e9 82 80 18|18 80 82 e9) ld r12,-32744\(r2\)
+.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
+.*: (4e 80 04 21|21 04 80 4e) bctrl
+.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\)
+#...
+.* <my_func@plt>:
+.*: (4b .. .. ..|.. .. .. 4b) b .* <__glink_PLTresolve>
--- /dev/null
+#source: inline.s
+#as: -a64
+#ld: -melf64ppc --hash-style=gnu
+#ld_after_inputfiles: tmpdir/funv2.so
+#objdump: -dr
+
+.*
+
+Disassembly of section \.text:
+
+.*:
+.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (e9 82 80 18|18 80 82 e9) ld r12,-32744\(r2\)
+.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
+.*: (4e 80 04 21|21 04 80 4e) bctrl
+.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\)
+#...
+.* <my_func@plt>:
+.*: (4b .. .. ..|.. .. .. 4b) b .* <__glink_PLTresolve>
--- /dev/null
+#source: inline.s
+#source: funv2.s
+#as: -a64
+#ld: -melf64ppc --hash-style=gnu
+#objdump: -dr
+
+.*
+
+Disassembly of section \.text:
+
+.*:
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (48 .. .. ..|.. .. .. 48) bl .* <my_func>
+.*: (60 00 00 00|00 00 00 60) nop
+
+.* <my_func>:
+.*: (4e 80 00 20|20 00 80 4e) blr
--- /dev/null
+#source: inline.s
+#as: -a64
+#ld: -melf64ppc --no-toc-opt --hash-style=gnu
+#ld_after_inputfiles: tmpdir/funv2.so
+#objdump: -dr
+
+.*
+
+Disassembly of section \.text:
+
+.*:
+.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
+.*: (3d 82 00 00|00 00 82 3d) addis r12,r2,0
+.*: (e9 8c 80 18|18 80 8c e9) ld r12,-32744\(r12\)
+.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
+.*: (4e 80 04 21|21 04 80 4e) bctrl
+.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\)
+#...
+.* <my_func@plt>:
+.*: (4b .. .. ..|.. .. .. 4b) b .* <__glink_PLTresolve>
--- /dev/null
+ .text
+ .globl _start
+_start:
+ std 2,24(1)
+ .reloc .-4,R_PPC64_PLTSEQ,my_func
+ addis 12,2,my_func@plt@ha # .reloc .,R_PPC64_PLT16_HA,my_func
+ ld 12,my_func@plt@l(12) # .reloc .,R_PPC64_PLT16_LO_DS,my_func
+ mtctr 12
+ .reloc .-4,R_PPC64_PLTSEQ,my_func
+ bctrl
+ .reloc .-4,R_PPC64_PLTCALL,my_func
+ ld 2,24(1)
--- /dev/null
+#source: inlinepcrel.s
+#as: -a64 -mpower10
+#ld: -melf64ppc -shared --hash-style=gnu
+#objdump: -dr -Mpower10
+
+.*
+
+Disassembly of section \.text:
+
+.*:
+.*: (04 10 00 01|01 00 10 04) pld r12,65944
+.*: (e5 80 01 98|98 01 80 e5)
+.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
+.*: (4e 80 04 21|21 04 80 4e) bctrl
+#...
+.* <my_func@plt>:
+.*: (4b .. .. ..|.. .. .. 4b) b .* <__glink_PLTresolve>
--- /dev/null
+#source: inlinepcrel.s
+#as: -a64 -mpower10
+#ld: -melf64ppc --hash-style=gnu
+#ld_after_inputfiles: tmpdir/funv2.so
+#objdump: -dr -Mpower10
+
+.*
+
+Disassembly of section \.text:
+
+.*:
+.*: (04 10 00 01|01 00 10 04) pld r12,66072
+.*: (e5 80 02 18|18 02 80 e5)
+.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
+.*: (4e 80 04 21|21 04 80 4e) bctrl
+#...
+.* <my_func@plt>:
+.*: (4b .. .. ..|.. .. .. 4b) b .* <__glink_PLTresolve>
--- /dev/null
+#source: inlinepcrel.s
+#source: funv2.s
+#as: -a64 -mpower10
+#ld: -melf64ppc --hash-style=gnu
+#objdump: -dr -Mpower10
+
+.*
+
+Disassembly of section \.text:
+
+.*:
+.*: (07 00 00 00|00 00 00 07) pnop
+.*: (00 00 00 00|00 00 00 00)
+.*: (60 00 00 00|00 00 00 60) nop
+.*: (48 .. .. ..|.. .. .. 48) bl .* <my_func>
+
+.* <my_func>:
+.*: (4e 80 00 20|20 00 80 4e) blr
--- /dev/null
+ .text
+ .globl _start
+_start:
+ pld 12,0(0),1
+ .reloc .-8,R_PPC64_PLT_PCREL34_NOTOC,my_func
+ mtctr 12
+ .reloc .-4,R_PPC64_PLTSEQ_NOTOC,my_func
+ bctrl
+ .reloc .-4,R_PPC64_PLTCALL_NOTOC,my_func
run_dump_test "callstub-2"
run_dump_test "callstub-3"
run_dump_test "callstub-4"
+ run_dump_test "inline-1"
+ run_dump_test "inline-2"
+ run_dump_test "inline-3"
+ run_dump_test "inline-4"
+ run_dump_test "inlinepcrel-1"
+ run_dump_test "inlinepcrel-2"
+ run_dump_test "inlinepcrel-3"
run_dump_test "tlsgd"
run_dump_test "tlsld"
run_dump_test "tlsie"