0855e32bf5
* reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL, BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ, BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New relocations. * libbfd.h: Rebuilt. * bfd-in2.h: Rebuilt. * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations. (elf32_arm_reloc_map): Likewise. (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates. (elf32_arm_stub_long_branch_any_tls_pic, elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates. (DEF_STUBS): Add new stubs. (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field. (elf32_arm_local_tlsdesc_gotent): New. (GOT_TLS_GDESC): New mask. (GOT_TLS_GD_ANY): Define. (struct elf32_arm_link_hash_entry): Add tlsdesc_got field. (elf32_arm_compute_jump_table_size): New. (struct elf32_arm_link_hash_table): Add next_tls_desc_index, num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline, sgotplt_jump_table_size fields. (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field. (elf32_arm_link_hash_table_create): Initialize new fields. (arm_type_of_stub): Check TLS desc relocs too. (elf32_arm_stub_name): TLS desc relocs can be shared. (elf32_arm_tls_transition): Determine relaxation. (arm_stub_required_alignment): Add tls stubs. (elf32_arm_size_stubs): Likewise. (elf32_arm_tls_relax): Perform TLS relaxing. (elf32_arm_final_link_relocate): Process TLS DESC relocations. (IS_ARM_TLS_GNU_RELOC): New. (IS_ARM_TLS_RELOC): Use it. (elf32_arm_relocate_section): Perform TLS relaxing. (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls desc relocations. (allocate_dynrelocs): Allocate tls desc relcoations. (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping symbols. (elf32_arm_size_dynamic_sections): Allocate tls trampolines and got slots. (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE symbol. (elf32_arm_finish_dynamic_symbol): Adjust. (arm_put_trampoline): New. (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls trampolines. (elf_backend_always_size_sections): Define. include/elf/ * arm.h (R_ARM_TLS_DESC, R_ARM_TLS_GOTDESC, R_ARM_TLS_CALL, R_ARM_TLS_DESCSEQ, T_ARM_THM_TLS_CALL, R_ARM_THM_TLS_DESCSEQ): New relocations. gas/ * doc/c-arm.texi: Document TLSDESC and TLSCALL relocations, and .tlsdescseq directive. * config/tc-arm.c (arm_typed_reg_parse): Check for potential reloc following a symbol. (s_arm_tls_descseq): New directive. (md_pseudo_table): Add it. (encode_branch): Allow TLS_CALL relocs too. (do_t_blx, do_t_branch23): Use encode_branch. (reloc_names): Add tlsdesc and tlscall. (md_apply_fix): Process tls desc relocations. (tc_gen_reloc): Likewise. (arm_fix_adjustable): Likewise. gas/testsuite/ * gas/arm/tls.s: Add tlsdesc tests. * gas/arm/tls.d: Adjust. ld/testsuite/ * ld-arm/arm-elf.exp: Added tests for new TLS handling relocations. * ld-arm/tls-descrelax-be32.d: New. * ld-arm/tls-descrelax-be32.s: New. * ld-arm/tls-descrelax-be8.d: New. * ld-arm/tls-descrelax-be8.s: New. * ld-arm/tls-descrelax-v7.d: New. * ld-arm/tls-descrelax-v7.s: New. * ld-arm/tls-descrelax.d: New. * ld-arm/tls-descrelax.s: New. * ld-arm/tls-descseq.d: New. * ld-arm/tls-descseq.r: New. * ld-arm/tls-descseq.s: New. * ld-arm/tls-gdesc-got.d: New. * ld-arm/tls-gdesc-got.s: New. * ld-arm/tls-gdesc-nlazy.g: New. * ld-arm/tls-gdesc-nlazy.s: New. * ld-arm/tls-gdesc.d: New. * ld-arm/tls-gdesc.r: New. * ld-arm/tls-gdesc.s: New. * ld-arm/tls-gdierelax.d: New. * ld-arm/tls-gdierelax.s: New. * ld-arm/tls-gdierelax2.d: New. * ld-arm/tls-gdierelax2.s: New. * ld-arm/tls-gdlerelax.d: New. * ld-arm/tls-gdlerelax.s: New. * ld-arm/tls-lib-loc.d: New. * ld-arm/tls-lib-loc.r: New. * ld-arm/tls-lib-loc.s: New. * ld-arm/tls-longplt-lib.d: New. * ld-arm/tls-longplt-lib.s: New. * ld-arm/tls-longplt.d: New. * ld-arm/tls-longplt.s: New. * ld-arm/tls-mixed.r: New. * ld-arm/tls-mixed.s: New. * ld-arm/tls-thumb1.d: New. * ld-arm/tls-thumb1.s: New. * ld-arm/arm-elf.exp: New.
74 lines
2.2 KiB
Makefile
74 lines
2.2 KiB
Makefile
.*: file format elf32-.*arm
|
|
architecture: arm, flags 0x00000150:
|
|
HAS_SYMS, DYNAMIC, D_PAGED
|
|
start address 0x.*
|
|
|
|
Disassembly of section .plt:
|
|
|
|
00008164 <.plt>:
|
|
8164: e52de004 push {lr} ; .*
|
|
8168: e59fe004 ldr lr, \[pc, #4\] ; .*
|
|
816c: e08fe00e add lr, pc, lr
|
|
8170: e5bef008 ldr pc, \[lr, #8\]!
|
|
8174: 000080f0 .word 0x000080f0
|
|
8178: e08e0000 add r0, lr, r0
|
|
817c: e5901004 ldr r1, \[r0, #4\]
|
|
8180: e12fff11 bx r1
|
|
8184: e52d2004 push {r2} ; .*
|
|
8188: e59f200c ldr r2, \[pc, #12\] ; .*
|
|
818c: e59f100c ldr r1, \[pc, #12\] ; .*
|
|
8190: e79f2002 ldr r2, \[pc, r2\]
|
|
8194: e081100f add r1, r1, pc
|
|
8198: e12fff12 bx r2
|
|
819c: 000080e8 .word 0x000080e8
|
|
81a0: 000080c8 .word 0x000080c8
|
|
|
|
Disassembly of section .text:
|
|
|
|
000081a8 <text>:
|
|
81a8: e59f0004 ldr r0, \[pc, #4\] ; .*
|
|
81ac: ebfffff1 bl 8178 .*
|
|
81b0: e1a00000 nop ; .*
|
|
81b4: 000080c0 .word 0x000080c0
|
|
81b8: 4801 ldr r0, \[pc, #4\] ; .*
|
|
81ba: f000 e806 blx 81c8 .*
|
|
81be: 46c0 nop ; .*
|
|
81c0: 000080b1 .word 0x000080b1
|
|
81c4: 00000000 .word 0x00000000
|
|
|
|
000081c8 <__unnamed_veneer>:
|
|
81c8: 4778 bx pc
|
|
81ca: 46c0 nop ; .*
|
|
81cc: e59f1000 ldr r1, \[pc, #0\] ; .*
|
|
81d0: e081f00f add pc, r1, pc
|
|
81d4: ffffffa0 .word 0xffffffa0
|
|
|
|
Disassembly of section .foo:
|
|
|
|
04001000 <foo>:
|
|
4001000: e59f0004 ldr r0, \[pc, #4\] ; .*
|
|
4001004: eb000009 bl 4001030 .*
|
|
4001008: e1a00000 nop ; .*
|
|
400100c: fc00f268 .word 0xfc00f268
|
|
4001010: e59f0004 ldr r0, \[pc, #4\] ; .*
|
|
4001014: eb000005 bl 4001030 .*
|
|
4001018: e1a00000 nop ; .*
|
|
400101c: fc00f260 .word 0xfc00f260
|
|
4001020: 4801 ldr r0, \[pc, #4\] ; .*
|
|
4001022: f000 e80c blx 400103c .*
|
|
4001026: 46c0 nop ; .*
|
|
4001028: fc00f249 .word 0xfc00f249
|
|
400102c: 00000000 .word 0x00000000
|
|
|
|
04001030 <__unnamed_veneer>:
|
|
4001030: e59f1000 ldr r1, \[pc, #0\] ; .*
|
|
4001034: e08ff001 add pc, pc, r1
|
|
4001038: fc00713c .word 0xfc00713c
|
|
|
|
0400103c <__unnamed_veneer>:
|
|
400103c: 4778 bx pc
|
|
400103e: 46c0 nop ; .*
|
|
4001040: e59f1000 ldr r1, \[pc, #0\] ; .*
|
|
4001044: e081f00f add pc, r1, pc
|
|
4001048: fc00712c .word 0xfc00712c
|
|
400104c: 00000000 .word 0x00000000
|