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.
58 lines
1.4 KiB
Makefile
58 lines
1.4 KiB
Makefile
|
|
.*: file format.*
|
|
|
|
Disassembly of section .text:
|
|
|
|
00008000 <_start>:
|
|
8000: eb00000d bl 803c <arm>
|
|
8004: fa00000d blx 8040 <t1>
|
|
8008: fb00000c blx 8042 <t2>
|
|
800c: fb00000d blx 804a <t5>
|
|
8010: fa00000a blx 8040 <t1>
|
|
8014: fb000009 blx 8042 <t2>
|
|
8018: ea000010 b 8060 <__t1_from_arm>
|
|
801c: ea000011 b 8068 <__t2_from_arm>
|
|
8020: 1b00000e blne 8060 <__t1_from_arm>
|
|
8024: 1b00000f blne 8068 <__t2_from_arm>
|
|
8028: 1b000003 blne 803c <arm>
|
|
802c: eb000002 bl 803c <arm>
|
|
8030: faffffff blx 8034 <thumblocal>
|
|
|
|
00008034 <thumblocal>:
|
|
8034: 4770 bx lr
|
|
|
|
00008036 <t3>:
|
|
8036: 4770 bx lr
|
|
|
|
00008038 <t4>:
|
|
8038: 4770 bx lr
|
|
803a: 46c0 nop ; \(mov r8, r8\)
|
|
|
|
0000803c <arm>:
|
|
803c: e12fff1e bx lr
|
|
|
|
00008040 <t1>:
|
|
8040: 4770 bx lr
|
|
|
|
00008042 <t2>:
|
|
8042: f7ff fff8 bl 8036 <t3>
|
|
8046: f7ff fff7 bl 8038 <t4>
|
|
|
|
0000804a <t5>:
|
|
804a: f000 f801 bl 8050 <local_thumb>
|
|
804e: 46c0 nop ; \(mov r8, r8\)
|
|
|
|
00008050 <local_thumb>:
|
|
8050: f7ff fff1 bl 8036 <t3>
|
|
8054: f7ff efd4 blx 8000 <_start>
|
|
8058: f7ff efd2 blx 8000 <_start>
|
|
805c: 0000 lsls r0, r0, #0
|
|
...
|
|
|
|
00008060 <__t1_from_arm>:
|
|
8060: e51ff004 ldr pc, \[pc, #-4\] ; 8064 <__t1_from_arm\+0x4>
|
|
8064: 00008041 .word 0x00008041
|
|
|
|
00008068 <__t2_from_arm>:
|
|
8068: e51ff004 ldr pc, \[pc, #-4\] ; 806c <__t2_from_arm\+0x4>
|
|
806c: 00008043 .word 0x00008043
|