Simplify elf64_alpha_relocate_section
Use elf_section_data to access the dynamic relocation section in elf64_alpha_relocate_section, simplifying the code.
This patch simplifies the elf64_alpha_relocate_section function by using elf_section_data to retrieve the dynamic relocation section associated with the input section. Prior to a previous change, the alpha architecture didn’t use elf_section_data(sec)->sreloc to store the dynamic relocation section. This change streamlines the code by using the already-set elf_section_data instead of re-deriving the information.
In Details
This patch modifies bfd/elf64-alpha.c to simplify how the dynamic relocation section is accessed during relocation. The Alpha ELF backend in BFD (Binary File Descriptor library) is responsible for handling ELF object files for the Alpha architecture. The patch leverages elf_section_data to avoid redundant lookups.
For Context
This patch simplifies a function in the binutils that handles the relocation process for ELF (Executable and Linkable Format) files on the Alpha architecture. Relocation is the process of adjusting addresses in a program's code and data when it is linked or loaded into memory. The patch makes the code easier to read and maintain by using a more direct method to access the dynamic relocation section.