BFD/ELF: Fix writing of secondary reloc sections
Corrects a typo in secondary relocation section handling to ensure internal relocations are correctly looked up.
A regression introduced by a previous change to move section information caused a typo in the ELF secondary relocation writing function. This typo led to incorrect lookups of internal relocations for secondary sections. This fix corrects the typo, ensuring that the correct section information is used, resolving the bug.
In Details
This commit corrects a typo in _bfd_elf_write_secondary_reloc_section in bfd/elf.c. The typo caused sec->sec_info to be used instead of relsec->sec_info, breaking the internal relocation lookup for secondary relocation sections. This was a regression from commit eb92a17c47ea, which moved sec_info from ELF-specific structures to the general section struct.