diff options
author | Alan Modra <amodra@gmail.com> | 2019-07-24 10:11:08 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-07-24 16:12:01 +0930 |
commit | c5e20471be97e2dcd3498ac284487e2546715f66 (patch) | |
tree | 891ed12d3c1be17fc82f02ef4d1e44e6fbee88ca /bfd/elf32-xtensa.c | |
parent | 7613ca5e3885b8e79d9096a53f3e5492a5c06cd7 (diff) | |
download | gdb-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/elf32-xtensa.c')
-rw-r--r-- | bfd/elf32-xtensa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 66d23a8..40edb46 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -3466,7 +3466,7 @@ static void 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)) { @@ -3474,10 +3474,10 @@ elf_xtensa_final_write_processing (bfd *abfd, bfd_boolean linker) 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); } |