aboutsummaryrefslogtreecommitdiff
path: root/gas/write.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2009-08-17 11:45:23 +0000
committerKai Tietz <kai.tietz@onevision.com>2009-08-17 11:45:23 +0000
commitf3d2b04b5f22ad48ed6e62b207ba759694569935 (patch)
tree136b041b239142552b99099a4f99a521c2199ac2 /gas/write.c
parentf1f2b5f40ef91b70acaa733f6f92f08de5efa29f (diff)
downloadgdb-f3d2b04b5f22ad48ed6e62b207ba759694569935.zip
gdb-f3d2b04b5f22ad48ed6e62b207ba759694569935.tar.gz
gdb-f3d2b04b5f22ad48ed6e62b207ba759694569935.tar.bz2
2009-08-17 Kai Tietz <kai.tietz@onevision.com>
* config/obj-coff-seh.c: New file. * config/obj-coff-seh.h: Likewise. * config/obj-coff.c (obj-coff-seh.c): Add include. (coff_pseudo_table): Add new .seh... commands. * config/obj-coff.h (obj_coff_seh_do_final): Add new function prototype. (obj_coff_generate_pdata): New obj-coff hook. * gas/write.c (size_seg): Avoid sizing of already sized sections. (write_object_file): Call conditional hook objc_coff_generate_pdata. * Makefile.am: Add dependencies for new files. * Makefile.in: Regenerated.
Diffstat (limited to 'gas/write.c')
-rw-r--r--gas/write.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gas/write.c b/gas/write.c
index 4d64651..4f1dc4c 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -560,6 +560,9 @@ size_seg (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
size = 0;
flags = bfd_get_section_flags (abfd, sec);
+ if (size == 0 && bfd_get_section_size (sec) != 0 &&
+ (flags & SEC_HAS_CONTENTS) != 0)
+ return;
if (size > 0 && ! seginfo->bss)
flags |= SEC_HAS_CONTENTS;
@@ -1886,16 +1889,17 @@ write_object_file (void)
#ifdef obj_frob_file
obj_frob_file ();
#endif
-
+#ifdef obj_coff_generate_pdata
+ obj_coff_generate_pdata ();
+#endif
bfd_map_over_sections (stdoutput, write_relocs, (char *) 0);
-#ifdef tc_frob_file_after_relocs
+#ifdef tc_frob_file_after_reloc
tc_frob_file_after_relocs ();
#endif
#ifdef obj_frob_file_after_relocs
obj_frob_file_after_relocs ();
#endif
-
bfd_map_over_sections (stdoutput, write_contents, (char *) 0);
}