| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * elf32-arm.c (elf32_arm_get_stub_entry): Assert that we don't access |
| passed the end of htab->stub_group array. |
| (elf32_arm_create_or_find_stub_sec): Likewise. |
| (elf32_arm_create_stub): Likewise. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add a new parameter for |
| the input import library bfd. |
| * bfd-in2.h: Regenerate. |
| * elf32-arm.c (struct elf32_arm_link_hash_table): New in_implib_bfd |
| and new_cmse_stub_offset fields. |
| (stub_hash_newfunc): Initialize stub_offset and stub_template_size to |
| -1. |
| (elf32_arm_add_stub): Likewise for stub_offset. |
| (arm_new_stubs_start_offset_ptr): New function. |
| (arm_build_one_stub): Only allocate a stub_offset if it is -1. Allow |
| empty veneers to have zero relocations. |
| (arm_size_one_stub): Only initialize stub size and template |
| information for non empty veneers. Do not update veneer section size |
| if veneer already has an offset. |
| (elf32_arm_create_stub): Return the stub entry pointer or NULL instead |
| of a boolean indicating success or failure. |
| (cmse_scan): Change stub_changed parameter into an integer pointer |
| parameter cmse_stub_created to count the number of stub created and |
| adapt to change of return value in elf32_arm_create_stub. |
| (cmse_entry_fct_p): New function. |
| (arm_list_new_cmse_stub): Likewise. |
| (set_cmse_veneer_addr_from_implib): Likewise. |
| (elf32_arm_size_stubs): Define cmse_stub_created, pass its address to |
| cmse_scan instead of that of cmse_stub_changed to compute the number |
| of stub created and use it to initialize stub_changed. Call |
| set_cmse_veneer_addr_from_implib after all cmse_scan. Adapt to change |
| of return value in elf32_arm_create_stub. Use |
| arm_stub_section_start_offset () if not NULL to initialize size of |
| secure gateway veneers section. Initialize stub_offset of Cortex-A8 |
| erratum fix to -1. Use ret to hold return value. |
| (elf32_arm_build_stubs): Use arm_stub_section_start_offset () if not |
| NULL to initialize size of secure gateway veneers section. Adapt |
| comment to stress the importance of zeroing veneer section content. |
| (bfd_elf32_arm_set_target_relocs): Add new in_implib_bfd parameter to |
| initialize eponymous field in struct elf32_arm_link_hash_table. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add one parameter. |
| * bfd-in2.h: Regenerate. |
| * elf32-arm.c (struct elf32_arm_link_hash_table): Declare new |
| cmse_implib field. |
| (bfd_elf32_arm_set_target_relocs): Add new parameter to initialize |
| cmse_implib field in struct elf32_arm_link_hash_table. |
| (elf32_arm_filter_cmse_symbols): New function. |
| (elf32_arm_filter_implib_symbols): Likewise. |
| (elf_backend_filter_implib_symbols): Define to |
| elf32_arm_filter_implib_symbols. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * elf-bfd.h (elf_backend_filter_implib_symbols): Declare backend hook. |
| (_bfd_elf_filter_global_symbols): Declare. |
| * elf.c (_bfd_elf_filter_global_symbols): New function. |
| * elflink.c (elf_filter_global_symbols): Likewise. |
| (elf_output_implib): Likewise. |
| (bfd_elf_final_link): Call above function, failing if it does. |
| * elfxx-target.h (elf_backend_filter_implib_symbols): Define macro and |
| default it to NULL. |
| (elf_backend_copy_indirect_symbol): Fix spacing. |
| (elf_backend_hide_symbol): Likewise. |
| (elfNN_bed): Initialize elf_backend_filter_implib_symbols backend hook. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * elf32-arm.c (CMSE_PREFIX): Define macro. |
| (elf32_arm_stub_cmse_branch_thumb_only): Define stub sequence. |
| (cmse_branch_thumb_only): Declare stub. |
| (struct elf32_arm_link_hash_table): Define cmse_stub_sec field. |
| (elf32_arm_get_plt_info): Add globals parameter. Use it to return |
| FALSE if there is no PLT. |
| (arm_type_of_stub): Adapt to new elf32_arm_get_plt_info signature. |
| (elf32_arm_final_link_relocate): Likewise. |
| (elf32_arm_gc_sweep_hook): Likewise. |
| (arm_stub_is_thumb): Add case for arm_stub_cmse_branch_thumb_only. |
| (arm_dedicated_stub_output_section_required): Likewise. |
| (arm_dedicated_stub_output_section_required_alignment): Likewise. |
| (arm_stub_dedicated_output_section_name): Likewise. |
| (arm_stub_dedicated_input_section_ptr): Likewise and remove |
| ATTRIBUTE_UNUSED for htab parameter. |
| (arm_stub_required_alignment): Likewise. |
| (arm_stub_sym_claimed): Likewise. |
| (arm_dedicated_stub_section_padding): Likewise. |
| (cmse_scan): New function. |
| (elf32_arm_size_stubs): Call cmse_scan for ARM M profile targets. |
| Set stub_changed to TRUE if such veneers were created. |
| (elf32_arm_swap_symbol_in): Add detection code for CMSE special |
| symbols. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * elf32-arm.c (arm_dedicated_stub_section_padding): New function. |
| (elf32_arm_size_stubs): Declare stub_type in a more outer scope and |
| account for padding for stub section requiring one. |
| (elf32_arm_build_stubs): Add comment to stress the importance of |
| zeroing veneer section content. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * bfd-in.h (bfd_elf32_arm_keep_private_stub_output_sections): Declare |
| bfd hook. |
| * bfd-in2.h: Regenerate. |
| * elf32-arm.c (arm_dedicated_stub_output_section_required): New |
| function. |
| (arm_dedicated_stub_output_section_required_alignment): Likewise. |
| (arm_dedicated_stub_output_section_name): Likewise. |
| (arm_dedicated_stub_input_section_ptr): Likewise. |
| (elf32_arm_create_or_find_stub_sec): Add stub type parameter and |
| function description comment. Add support for dedicated output stub |
| section to given stub types. |
| (elf32_arm_add_stub): Add a stub type parameter and pass it down to |
| elf32_arm_create_or_find_stub_sec. |
| (elf32_arm_create_stub): Pass stub type down to elf32_arm_add_stub. |
| (elf32_arm_size_stubs): Pass stub type when calling |
| elf32_arm_create_or_find_stub_sec for Cortex-A8 erratum veneers. |
| (bfd_elf32_arm_keep_private_stub_output_sections): New function. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * elf32-arm.c (enum elf32_arm_stub_type): New max_stub_type |
| enumerator. |
| (arm_stub_sym_claimed): New function. |
| (elf32_arm_create_stub): Use veneered symbol name and section if |
| veneer needs to claim its symbol, and keep logic unchanged otherwise. |
| (arm_stub_claim_sym): New function. |
| (arm_map_one_stub): Call arm_stub_claim_sym if veneer needs to claim |
| veneered symbol, otherwise create local symbol as before. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * elf32-arm.c (elf32_arm_size_stubs): Use new macros |
| ARM_GET_SYM_BRANCH_TYPE and ARM_SET_SYM_BRANCH_TYPE to respectively get |
| and set branch type of a symbol. |
| (bfd_elf32_arm_process_before_allocation): Likewise. |
| (elf32_arm_relocate_section): Likewise and fix identation along the |
| way. |
| (allocate_dynrelocs_for_symbol): Likewise. |
| (elf32_arm_finish_dynamic_symbol): Likewise. |
| (elf32_arm_swap_symbol_in): Likewise. |
| (elf32_arm_swap_symbol_out): Likewise. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * bfd-in.h (elf32_arm_size_stubs): Add an output section parameter. |
| * bfd-in2.h: Regenerated. |
| * elf32-arm.c (struct elf32_arm_link_hash_table): Add an output section |
| parameter to add_stub_section callback. |
| (elf32_arm_create_or_find_stub_sec): Get output section from link_sec |
| and pass it down to add_stub_section. |
| (elf32_arm_add_stub): Set section to stub_sec if NULL before using it |
| for error message. |
| (elf32_arm_size_stubs): Add output section parameter to |
| add_stub_section function pointer parameter. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * elf32-arm.c (elf32_arm_create_stub): New function. |
| (elf32_arm_size_stubs): Use elf32_arm_create_stub for stub creation. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| * elf32-arm.c (struct elf32_arm_stub_hash_entry): Delete target_addend |
| field and add source_value. |
| (struct a8_erratum_fix): Delete addend field and add target_offset. |
| (stub_hash_newfunc): Initialize source_value field amd remove |
| initialization for target_addend. |
| (arm_build_one_stub): Stop special casing Thumb relocations: promote |
| the else to being always executed, moving the |
| arm_stub_a8_veneer_b_cond specific code in it. Remove |
| stub_entry->target_addend from points_to computation. |
| (cortex_a8_erratum_scan): Store in a8_erratum_fix structure the offset |
| to target symbol from start of section rather than the offset from the |
| stub address. |
| (elf32_arm_size_stubs): Set stub_entry's source_value and target_value |
| fields from struct a8_erratum_fix's offset and target_offset |
| respectively. |
| (make_branch_to_a8_stub): Rename target variable to loc. Compute |
| veneered_insn_loc and loc using stub_entry's source_value. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| (elf32_arm_merge_eabi_attributes): Add merging logic for |
| Tag_DSP_extension. |
| |
| 2016-03-29 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| Revert |
| 2015-12-17 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| (elf32_arm_merge_eabi_attributes): Add merging logic for |
| Tag_DSP_extension. |
| |
| 2015-12-17 Thomas Preud'homme <thomas.preudhomme@arm.com> |
| |
| (elf32_arm_merge_eabi_attributes): Add merging logic for |
| Tag_DSP_extension. |