ARM: Delay setting PLT header and entry size.
Delays the initialization of PLT-related variables in the ARM backend to ensure correct values are used, and moves some related functions.
The ARM backend in BFD previously set the PLT header and entry sizes in elf32_arm_create_dynamic_sections. However, this required a workaround for using_thumb_only() because the output file attributes were not yet set. This commit moves the initialization of these variables to elf32_arm_late_size_sections, which is called after lang_check runs and guarantees that the values are initialized for all later uses. The commit also moves related functions and removes an unnecessary abort check.
In Details
This commit addresses issues in elf32-arm.c by delaying the initialization of plt_header_size and plt_entry_size. These values are now initialized in elf32_arm_late_size_sections, resolving dependencies on output file attributes. The patch also moves initialization of htab->stub_bfd earlier and relocates functions like add_glue_sections_to_bfd and get_bfd_for_interworking from ld/armelf.em to bfd/elf32-arm.c, improving code organization.
For Context
The ARM architecture support in the Binary File Descriptor (BFD) library requires careful setup of the Procedure Linkage Table (PLT), which enables shared libraries to call functions in other shared libraries. This commit rearranges the initialization of key variables related to the PLT to ensure that they are set correctly and consistently. These changes improve reliability and code organization within the ARM backend.