From 2c3e9fe24f79bb7cc618fc881272a47b828b07bb Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 12 Apr 2015 12:49:25 -0700 Subject: Delay output_has_begun --- bfd/elf.c | 4 ++-- bfd/elflink.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bfd/elf.c b/bfd/elf.c index 35d5824d878..5fb52e28e62 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -3740,9 +3740,9 @@ _bfd_elf_compute_section_file_positions (bfd *abfd, || ! _bfd_stringtab_emit (abfd, strtab)) return FALSE; _bfd_stringtab_free (strtab); - } - abfd->output_has_begun = TRUE; + abfd->output_has_begun = TRUE; + } return TRUE; } diff --git a/bfd/elflink.c b/bfd/elflink.c index 98d31080bca..9c8b024d280 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -10883,6 +10883,8 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) esdo->rela.count = 0; } + abfd->output_has_begun = TRUE; + /* We have now assigned file positions for all the sections except .symtab, .strtab, and non-loaded reloc sections. We start the .symtab section at the current file position, and write directly -- cgit v1.2.1