daily update
[deliverable/binutils-gdb.git] / binutils / rescoff.c
index 737eb4f0ba9895a0557dbc26eb16ed24fdc7f48d..6fc63dc84a03c7493befff2b3f6d9f704c7d2283 100644 (file)
@@ -1,5 +1,5 @@
 /* rescoff.c -- read and write resources in Windows COFF files.
-   Copyright 1997, 1998, 1999, 2000, 2003, 2007
+   Copyright 1997, 1998, 1999, 2000, 2003, 2007, 2008
    Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
    Rewritten by Kai Tietz, Onevision.
@@ -8,7 +8,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -455,15 +455,12 @@ write_coff_file (const char *filename, const char *target,
   if (! bfd_set_file_flags (abfd, HAS_SYMS | HAS_RELOC))
     bfd_fatal ("bfd_set_file_flags");
 
-  sec = bfd_make_section (abfd, ".rsrc");
+  sec = bfd_make_section_with_flags (abfd, ".rsrc",
+                                    (SEC_HAS_CONTENTS | SEC_ALLOC
+                                     | SEC_LOAD | SEC_DATA));
   if (sec == NULL)
     bfd_fatal ("bfd_make_section");
 
-  if (! bfd_set_section_flags (abfd, sec,
-                              (SEC_HAS_CONTENTS | SEC_ALLOC
-                               | SEC_LOAD | SEC_DATA)))
-    bfd_fatal ("bfd_set_section_flags");
-
   if (! bfd_set_symtab (abfd, sec->symbol_ptr_ptr, 1))
     bfd_fatal ("bfd_set_symtab");
 
This page took 0.022793 seconds and 4 git commands to generate.