GNU Binutils with patches for OS216
修訂 | 7550610057c51d47e3815ef93893d4f4faa7e03d (tree) |
---|---|
時間 | 2018-02-05 23:00:21 |
作者 | Maciej W. Rozycki <macro@mips...> |
Commiter | Maciej W. Rozycki |
ELF/BFD: Propagate the return status from backend section processing
Fix the issue of any failure from ->elf_backend_section_processing'
not being propagated by _bfd_elf_write_object_contents'. The MIPS
_bfd_mips_elf_section_processing' handler can actually potentially
fail, however the caller currently ignores that.
bfd/
* elf.c (_bfd_elf_write_object_contents): Propagate a failure
status from ->elf_backend_section_processing'.
@@ -1,3 +1,8 @@ | ||
1 | +2018-02-05 Maciej W. Rozycki <macro@mips.com> | |
2 | + | |
3 | + * elf.c (_bfd_elf_write_object_contents): Propagate a failure | |
4 | + status from `->elf_backend_section_processing'. | |
5 | + | |
1 | 6 | 2018-02-02 Jim Wilson <jimw@sifive.com> |
2 | 7 | |
3 | 8 | PR ld/22756 |
@@ -6354,7 +6354,8 @@ _bfd_elf_write_object_contents (bfd *abfd) | ||
6354 | 6354 | = _bfd_elf_strtab_offset (elf_shstrtab (abfd), |
6355 | 6355 | i_shdrp[count]->sh_name); |
6356 | 6356 | if (bed->elf_backend_section_processing) |
6357 | - (*bed->elf_backend_section_processing) (abfd, i_shdrp[count]); | |
6357 | + if (!(*bed->elf_backend_section_processing) (abfd, i_shdrp[count])) | |
6358 | + return FALSE; | |
6358 | 6359 | if (i_shdrp[count]->contents) |
6359 | 6360 | { |
6360 | 6361 | bfd_size_type amt = i_shdrp[count]->sh_size; |