mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
fe33d2fa46
Alan Modra <amodra@gmail.com> bfd/ * elf32-arm.c (a8_erratum_fix): Add st_type field to record the destination mode of the a8 stub. (elf32_arm_link_hash_table): Add top_id field. (elf32_arm_link_hash_table_create): Initialize top_id. (arm_type_of_stub): Update prototype, st_type can now be updated by this function. Actual destination address in case of PLT is computed here, to help factorizing code. (elf32_arm_stub_name): Update prototype, use stub_type additional parameter to build stub name. (elf32_arm_get_stub_entry): Update prototype, use stub_type additional parameter to build stub entry. (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of put_thumb_insn/put_arm_insn as BE8 encoding is now handled later. Call elf32_arm_final_link_relocate to process all in-stub relocations. (elf32_arm_setup_section_lists): Update top_id. (cortex_a8_erratum_scan): Record stub destination mode. (elf32_arm_size_stubs): Update call to arm_type_of_stub according to new prototype. (elf32_arm_final_link_relocate): Enable processing of in-stub REL32 relocations. Rely on arm_type_of_stub to detect if a stub is needed, enabling code factorization. (elf32_arm_final_link): Process stub sections. (elf32_arm_output_map_sym): Add entry to code/data map. ld/testsuite/ * ld-arm/arm-elf.exp: Change .text start address for farcall-thumb-arm tests. Add v4t variant for farcall-mixed-lib test. * ld-arm/farcall-mixed-lib-v4t.d: New test. * ld-arm/farcall-mixed-lib1.s: Don't force armv5t. * ld-arm/farcall-mixed-lib2.s: Likewise. * ld-arm/arm-call.d: Update expected results. * ld-arm/cortex-a8-far.d: Likewise. * ld-arm/farcall-group-size2.d: Likewise. * ld-arm/farcall-group.d: Likewise. * ld-arm/farcall-mix.d: Likewise. * ld-arm/farcall-mix2.d: Likewise. * ld-arm/farcall-mixed-app-v5.d: Likewise. * ld-arm/farcall-mixed-app.d: Likewise. * ld-arm/farcall-mixed-lib.d: Likewise. * ld-arm/farcall-thumb-arm.d: Likewise. * ld-arm/farcall-thumb-arm-blx.d: Likewise. * ld-arm/farcall-thumb-arm-pic-veneer.d: Likewise. * ld-arm/farcall-thumb-arm-blx-pic-veneer.d: Likewise. * ld-arm/farcall-thumb-arm.s: Update test. Add a new call to potentially generate different types of stubs.
57 lines
1.4 KiB
Makefile
57 lines
1.4 KiB
Makefile
|
|
.*: file format .*
|
|
|
|
Disassembly of section .text:
|
|
|
|
00001000 <_start>:
|
|
1000: eb000000 bl 1008 <__bar_from_arm>
|
|
1004: eb000002 bl 1014 <__bar2_veneer>
|
|
|
|
00001008 <__bar_from_arm>:
|
|
1008: e59fc000 ldr ip, \[pc, #0\] ; 1010 <__bar_from_arm\+0x8>
|
|
100c: e12fff1c bx ip
|
|
1010: 02003021 .word 0x02003021
|
|
00001014 <__bar2_veneer>:
|
|
1014: e51ff004 ldr pc, \[pc, #-4\] ; 1018 <__bar2_veneer\+0x4>
|
|
1018: 02003024 .word 0x02003024
|
|
101c: 00000000 .word 0x00000000
|
|
Disassembly of section .mytext:
|
|
|
|
00002000 <__bar3_veneer-0x10>:
|
|
2000: eb000002 bl 2010 <__bar3_veneer>
|
|
2004: eb000003 bl 2018 <__bar4_from_arm>
|
|
2008: eb000005 bl 2024 <__bar5_from_arm>
|
|
200c: 00000000 andeq r0, r0, r0
|
|
|
|
00002010 <__bar3_veneer>:
|
|
2010: e51ff004 ldr pc, \[pc, #-4\] ; 2014 <__bar3_veneer\+0x4>
|
|
2014: 02003028 .word 0x02003028
|
|
|
|
00002018 <__bar4_from_arm>:
|
|
2018: e59fc000 ldr ip, \[pc, #0\] ; 2020 <__bar4_from_arm\+0x8>
|
|
201c: e12fff1c bx ip
|
|
2020: 0200302d .word 0x0200302d
|
|
|
|
00002024 <__bar5_from_arm>:
|
|
2024: e59fc000 ldr ip, \[pc, #0\] ; 202c <__bar5_from_arm\+0x8>
|
|
2028: e12fff1c bx ip
|
|
202c: 0200302f .word 0x0200302f
|
|
...
|
|
Disassembly of section .foo:
|
|
|
|
02003020 <bar>:
|
|
2003020: 4770 bx lr
|
|
...
|
|
|
|
02003024 <bar2>:
|
|
2003024: e12fff1e bx lr
|
|
|
|
02003028 <bar3>:
|
|
2003028: e12fff1e bx lr
|
|
|
|
0200302c <bar4>:
|
|
200302c: 4770 bx lr
|
|
|
|
0200302e <bar5>:
|
|
200302e: 4770 bx lr
|