aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-vxworks.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-07-24 10:11:08 +0930
committerAlan Modra <amodra@gmail.com>2019-07-24 16:12:01 +0930
commitc5e20471be97e2dcd3498ac284487e2546715f66 (patch)
tree891ed12d3c1be17fc82f02ef4d1e44e6fbee88ca /bfd/elf-vxworks.c
parent7613ca5e3885b8e79d9096a53f3e5492a5c06cd7 (diff)
downloadgdb-c5e20471be97e2dcd3498ac284487e2546715f66.zip
gdb-c5e20471be97e2dcd3498ac284487e2546715f66.tar.gz
gdb-c5e20471be97e2dcd3498ac284487e2546715f66.tar.bz2
Re: ELF final_write_processing
I missed some early exits from final_write_processing that mean _bfd_elf_final_write_processing could be missed. * 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.
Diffstat (limited to 'bfd/elf-vxworks.c')
-rw-r--r--bfd/elf-vxworks.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/bfd/elf-vxworks.c b/bfd/elf-vxworks.c
index 32eb5a9..4447b36 100644
--- a/bfd/elf-vxworks.c
+++ b/bfd/elf-vxworks.c
@@ -221,13 +221,14 @@ elf_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
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);
}