mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
d3b10ee787
Needed for libraries that use ifuncs or other means to support cpu-optimized versions of functions, some power10, some not, and those functions make calls using linkage stubs. bfd/ * elf64-ppc.h (struct ppc64_elf_params): Add power10_stubs. * elf64-ppc.c (struct ppc_link_hash_table): Delete power10_stubs. (ppc64_elf_check_relocs): Adjust setting of power10_stubs. (plt_stub_size, ppc_build_one_stub, ppc_size_one_stub): Adjust uses of power10_stubs. ld/ * emultempl/ppc64elf.em (params): Init new field. (enum ppc64_opt): Add OPTION_POWER10_STUBS and OPTION_NO_POWER10_STUBS. (PARSE_AND_LIST_LONGOPTS): Support --power10-stubs and --no-power10-stubs. (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise. * testsuite/ld-powerpc/callstub-3.d: New test. * testsuite/ld-powerpc/powerpc.exp: Run it.
39 lines
1.3 KiB
Makefile
39 lines
1.3 KiB
Makefile
#source: callstub-1.s
|
|
#as: -a64 -mpower10
|
|
#ld: -melf64ppc -shared --plt-align=0 --hash-style=gnu --no-power10-stubs
|
|
#objdump: -dr -Mpower10
|
|
|
|
.*
|
|
|
|
Disassembly of section \.text:
|
|
|
|
.*\.plt_call\.f1>:
|
|
.*: (f8 41 00 18|18 00 41 f8) std r2,24\(r1\)
|
|
.*: (7d 88 02 a6|a6 02 88 7d) mflr r12
|
|
.*: (42 9f 00 05|05 00 9f 42) bcl .*
|
|
.*: (7d 68 02 a6|a6 02 68 7d) mflr r11
|
|
.*: (7d 88 03 a6|a6 03 88 7d) mtlr r12
|
|
.*: (3d 8b 00 01|01 00 8b 3d) addis r12,r11,1
|
|
.*: (e9 8c .. ..|.. .. 8c e9) ld r12,.*\(r12\)
|
|
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
|
|
.*: (4e 80 04 20|20 04 80 4e) bctr
|
|
|
|
.*\.plt_call\.f2>:
|
|
.*: (7d 88 02 a6|a6 02 88 7d) mflr r12
|
|
.*: (42 9f 00 05|05 00 9f 42) bcl .*
|
|
.*: (7d 68 02 a6|a6 02 68 7d) mflr r11
|
|
.*: (7d 88 03 a6|a6 03 88 7d) mtlr r12
|
|
.*: (3d 8b 00 01|01 00 8b 3d) addis r12,r11,1
|
|
.*: (e9 8c .. ..|.. .. 8c e9) ld r12,.*\(r12\)
|
|
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
|
|
.*: (4e 80 04 20|20 04 80 4e) bctr
|
|
|
|
#...
|
|
.*: (4b ff ff 81|81 ff ff 4b) bl .*\.plt_call\.f1>
|
|
.*: (e8 41 00 18|18 00 41 e8) ld r2,24\(r1\)
|
|
.*: (4b ff ff 7d|7d ff ff 4b) bl .*\.plt_call\.f1\+0x4>
|
|
.*: (4b ff ff 99|99 ff ff 4b) bl .*\.plt_call\.f2>
|
|
.*: (04 10 00 01|01 00 10 04) pld r3,.*
|
|
.*: (e4 60 .. ..|.. .. 60 e4)
|
|
#pass
|