X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=binutils%2Fresres.c;fp=binutils%2Fresres.c;h=c4eb7227bba3226c84dd7e4c3f0b5be1e96be82a;hp=49fb3fd14a9e789245bc93df202840b45ffc900f;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/binutils/resres.c b/binutils/resres.c index 49fb3fd..c4eb722 100644 --- a/binutils/resres.c +++ b/binutils/resres.c @@ -1,5 +1,5 @@ /* resres.c: read_res_file and write_res_file implementation for windres. - Copyright 1998, 1999, 2001, 2002, 2007 + Copyright 1998, 1999, 2001, 2002, 2005, 2007, 2008 Free Software Foundation, Inc. Written by Anders Norlander . Rewritten by Kai Tietz, Onevision. @@ -128,13 +128,11 @@ write_res_file (const char *fn,const rc_res_directory *resdir) filename = fn; abfd = windres_open_as_binary (filename, 0); - sec = bfd_make_section (abfd, ".data"); + sec = bfd_make_section_with_flags (abfd, ".data", + (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"); /* Requiring this is probably a bug in BFD. */ sec->output_section = sec; @@ -157,8 +155,8 @@ write_res_file (const char *fn,const rc_res_directory *resdir) (const rc_res_id *) NULL, &language, 1); if (sec_length != sec_length_wrote) - fatal ("res write failed with different sizes (%lu/%lu).", (long) sec_length, - (long) sec_length_wrote); + fatal ("res write failed with different sizes (%lu/%lu).", + (unsigned long) sec_length, (unsigned long) sec_length_wrote); bfd_close (abfd); return;