2019-07-24 Alan Modra <amodra@gmail.com>
+ * elf-vxworks.c (elf_vxworks_final_write_processing): Don't return
+ early.
+ * elf32-arc.c (arc_elf_final_write_processing): Likewise.
+ * elf32-xtensa.c (elf_xtensa_final_write_processing): Likewise.
+
+2019-07-24 Alan Modra <amodra@gmail.com>
+
* elf32-visium.c (visium_elf_post_process_headers): Don't set
EI_OSABI header byte here.
(ELF_OSABI): Define.
sec = bfd_get_section_by_name (abfd, ".rel.plt.unloaded");
if (!sec)
sec = bfd_get_section_by_name (abfd, ".rela.plt.unloaded");
- if (!sec)
- return;
- d = elf_section_data (sec);
- d->this_hdr.sh_link = elf_onesymtab (abfd);
- sec = bfd_get_section_by_name (abfd, ".plt");
if (sec)
- d->this_hdr.sh_info = elf_section_data (sec)->this_idx;
+ {
+ d = elf_section_data (sec);
+ d->this_hdr.sh_link = elf_onesymtab (abfd);
+ sec = bfd_get_section_by_name (abfd, ".plt");
+ if (sec)
+ d->this_hdr.sh_info = elf_section_data (sec)->this_idx;
+ }
_bfd_elf_final_write_processing (abfd, linker);
}
switch (bfd_get_mach (abfd))
{
- case bfd_mach_arc_arc600:
- emf = EM_ARC_COMPACT;
- break;
- case bfd_mach_arc_arc601:
- emf = EM_ARC_COMPACT;
- break;
- case bfd_mach_arc_arc700:
- emf = EM_ARC_COMPACT;
- break;
case bfd_mach_arc_arcv2:
emf = EM_ARC_COMPACT2;
break;
default:
- return;
+ emf = EM_ARC_COMPACT;
+ break;
}
elf_elfheader (abfd)->e_machine = emf;
else
e_flags |= E_ARC_OSABI_V3;
- elf_elfheader (abfd)->e_flags |= e_flags;
+ elf_elfheader (abfd)->e_flags |= e_flags;
_bfd_elf_final_write_processing (abfd, linker);
}
elf_xtensa_final_write_processing (bfd *abfd, bfd_boolean linker)
{
int mach;
- unsigned long val;
+ unsigned long val = elf_elfheader (abfd)->e_flags & EF_XTENSA_MACH;
switch (mach = bfd_get_mach (abfd))
{
val = E_XTENSA_MACH;
break;
default:
- return;
+ break;
}
- elf_elfheader (abfd)->e_flags &= (~ EF_XTENSA_MACH);
+ elf_elfheader (abfd)->e_flags &= ~EF_XTENSA_MACH;
elf_elfheader (abfd)->e_flags |= val;
_bfd_elf_final_write_processing (abfd, linker);
}