* write.c (write_contents): Don't crash if seginfo is NULL.

* config/obj-ecoff.c (ecoff_frob_file): Write out register masks
	by modifying .reginfo section, not by directly modifying BFD
	backend data.
This commit is contained in:
Ian Lance Taylor
1993-10-11 21:40:10 +00:00
parent a785321604
commit f37449aaf3
3 changed files with 34 additions and 8 deletions

View File

@@ -718,7 +718,8 @@ write_contents (abfd, sec, xxx)
fragS *f;
/* Write out the frags. */
if (! (bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS))
if (seginfo == NULL
|| ! (bfd_get_section_flags (abfd, sec) & SEC_HAS_CONTENTS))
return;
for (f = seginfo->frchainP->frch_root;