https://sourceware.org/bugzilla/show_bug.cgi?id=33705
Bug ID: 33705
Summary: Unused codes in copy_special_section_fields in elf.c
Product: binutils
Version: 2.45
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
copy_special_section_fields has
/* Allow the target a chance to decide how these fields should be set. */
if (bed->elf_backend_copy_special_section_fields (ibfd, obfd,
iheader, oheader))
return true;
/* We have an iheader which might match oheader, and which has non-zero
sh_info and/or sh_link fields. Attempt to follow those links and find
the section in the output bfd which corresponds to the linked section
in the input bfd. */
if (iheader->sh_link != SHN_UNDEF)
When targets define elf_backend_copy_special_section_fields to
_bfd_elf_copy_special_section_fields, the above codes are unused
for no SHT_SECONDARY_RELOC sections since
/* Set the ELF section header fields of an output secondary reloc section. */
bool
_bfd_elf_copy_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED,
bfd *obfd ATTRIBUTE_UNUSED,
const Elf_Internal_Shdr *isection,
Elf_Internal_Shdr *osection)
{
asection * isec;
asection * osec;
struct bfd_elf_section_data * esd;
if (isection == NULL)
return false;
if (isection->sh_type != SHT_SECONDARY_RELOC)
return true;
--
You are receiving this mail because:
You are on the CC list for the bug.