mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
491d01d3da
bfd * elf-bfd.h: Add callback to count additional relocations. * elf32-arm.c (_arm_elf_section_data): Add new counter. (insert_cantunwind_after): Increment relocations counter. (elf32_arm_fix_exidx_coverage): Remove exidx entries and add terminating CANTUNWIND entry only in final builds. (elf32_arm_add_relocation): New function. (elf32_arm_write_section): Add relocations in relocatable builds. (elf32_arm_count_additional_relocs): New function. (elf_backend_count_additional_relocs): New define. * bfd/elflink.c (bfd_elf_final_link): Use callback and adjust size of .rel section. * bfd/elfxx-target.h (elf_backend_count_additional_relocs): New define. ld * emultempl/armelf.em (gld${EMULATION_NAME}_after_allocation): Call elf32_arm_fix_exidx_coverage for relocatable builds. ld/testsuite * ld-arm/arm-elf.exp: New test. * ld-arm/unwind-rel.d: New file. * ld-arm/unwind-rel1.s: New file. * ld-arm/unwind-rel2.s: New file. * ld-arm/unwind-rel3.s: New file.
32 lines
995 B
Makefile
32 lines
995 B
Makefile
|
|
Relocation section '\.rel\.text' at offset .* contains 3 entries:
|
|
Offset Info Type Sym\.Value Sym\. Name
|
|
00000000 00000028 R_ARM_V4BX
|
|
00000004 00000028 R_ARM_V4BX
|
|
00000008 00000028 R_ARM_V4BX
|
|
|
|
Relocation section '\.rel\.ARM\.exidx' at offset .* contains 5 entries:
|
|
Offset Info Type Sym\.Value Sym\. Name
|
|
00000000 0000012a R_ARM_PREL31 00000000 \.text
|
|
00000000 00000e00 R_ARM_NONE 00000000 __aeabi_unwind_cpp_pr0
|
|
00000008 0000012a R_ARM_PREL31 00000000 \.text
|
|
00000010 0000012a R_ARM_PREL31 00000000 \.text
|
|
00000010 00000e00 R_ARM_NONE 00000000 __aeabi_unwind_cpp_pr0
|
|
|
|
Unwind table index '\.ARM\.exidx' at offset .* contains 3 entries:
|
|
|
|
0x0: 0x80a8b0b0
|
|
Compact model index: 0
|
|
0xa8 pop {r4, r14}
|
|
0xb0 finish
|
|
0xb0 finish
|
|
|
|
0x4 <test>: 0x1 \[cantunwind\]
|
|
|
|
0x8 <end>: 0x80a8b0b0
|
|
Compact model index: 0
|
|
0xa8 pop {r4, r14}
|
|
0xb0 finish
|
|
0xb0 finish
|
|
|