aboutsummaryrefslogtreecommitdiff
path: root/binutils/windres.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-21Fix memory access violations triggered by running strip on fuzzed binaries.Nick Clifton1-0/+1
PR binutils/17512 * coffcode.h (coff_set_arch_mach_hook): Check return value from bfd_malloc. (coff_slurp_line_table): Return FALSE if the line number information was corrupt. (coff_slurp_symbol_table): Return FALSE if the symbol information was corrupt. * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Always initialise the fields of the dyld_info structure. (bfd_mach_o_build_exec_seg_command): Replace assertion with an error message and a return value. (bfd_mach_o_layout_commands): Change the function to boolean. Return FALSE if the function fails. (bfd_mach_o_build_commands): Fail if bfd_mach_o_layout_commands fails. (bfd_mach_o_read_command): Fail if an unrecognised command is encountered. * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Set bfd_error if the read fails. (slurp_symtab): Check the return from bfd_malloc. (_bfd_XX_bfd_copy_private_bfd_data_common): Fail if the copy encountered an error. (_bfd_XXi_final_link_postscript): Fail if a section could not be copied. * peicode.h (pe_bfd_object_p): Fail if the header could not be swapped in. * tekhex.c (first_phase): Fail if the section is too big. * versados.c (struct esdid): Add content_size field. (process_otr): Use and check the new field. (versados_get_section_contents): Check that the section exists and that the requested data is available. PR binutils/17512 * addr2line.c (main): Call bfd_set_error_program_name. * ar.c (main): Likewise. * coffdump.c (main): Likewise. * cxxfilt.c (main): Likewise. * dlltool.c (main): Likewise. * nlmconv.c (main): Likewise. * nm.c (main): Likewise. * objdump.c (main): Likewise. * size.c (main): Likewise. * srconv.c (main): Likewise. * strings.c (main): Likewise. * sysdump.c (main): Likewise. * windmc.c (main): Likewise. * windres.c (main): Likewise. * objcopy.c (main): Likewise. (copy_relocations_in_section): Check for relocs without associated symbol pointers.
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-12-09Fix windres memory leakChen Gang1-0/+1
* windres.c (open_file_search): Free path buffer on failure.
2014-03-05Update copyright yearsAlan Modra1-1/+1
2013-11-22 * windres.c (define_resource): Use zero for timestamp, makingCory Fields1-11/+4
output deterministic. time.h include is no longer needed. * resres.c (res_append_resource): Likewise. * pe-dll.c (fill_edata): Only use a real timestamp if --insert-timestamp was used. * emultempl/pe.em: Add the --insert-timestamp option. * emultempl/pep.em: Likewise for 64bit. * ld.texinfo: Document the --insert-timestamp option. * libcoff-in.h: Add insert_timestamp flag to the pe_data struct. * libcoff.h: Regenerate. * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Only use a real timestamp if --insert-timestamp was used.
2012-02-09 * sysdep.h: Include sys/stat.h here.Alan Modra1-2/+1
* ar.c: Don't include headers already included by sysdep.h. * bucomm.c: Likewise. * budbg.h: Likewise. * dlltool.h: Likewise. * elfedit.c: Likewise. * nlmconv.c: Likewise. * objcopy.c: Likewise. * objdump.c: Likewise. * objdump.h: Likewise. * readelf.c: Likewise. * rename.c: Likewise. * resrc.c: Likewise. * strings.c: Likewise. * windres.c: Likewise. * od-macho.c: Ensure #include sysdep.h is first. * od-xcoff.c: Likewise. * dllwrap.c: Remove alloca pragma handled by sysdep.h, and remove duplicate headers. * dlltool.c: Likewise and ensure #include sysdep.h is first.
2011-06-02Fix spelling mistakes.Nick Clifton1-5/+5
2011-04-13 * windres.c (usage): Add new --preprocessor-arg option.Nick Clifton1-2/+23
(option_values): Add new OPTION_PREPROCESSOR_ARG enumerator. (option long_options): Add preprocessor-arg option. (main): Handle it. * doc/binutils.texi: Add documentation for --preprocessor-arg option. * NEWS: Add line about new --preprocessor-arg option for windres. * binutils-all/windres/windres.exp: Add '// cpparg <option>' command to rc file interpretation to specify addition pre-processor commands as script option. * binutils-all/windres/strtab3.rc: New. * binutils-all/windres/strtab3.rsd: New. * binutils-all/windres/README: Add note about cpparg script option. argument
2010-06-17 PR binutils/11711Nick Clifton1-11/+30
* windres.c (enum option_values): New enum. (long_options): Use separate option number for --include-dir option. (main): Separate backwards compatibility check from code to implement --include-dir. Check to see if directory exists and do not complain if it does.
2009-11-162009-11-16 Kai Tietz <kai.tietz@onevision.com>Kai Tietz1-57/+4
* windmc.c (set_endianess): Use bfd_get_target_info. * windres.c (set_endianess): Likewise. (find_arch_match): Removed.
2009-09-11 * obcopy.c (copy_object): New parameter `input_arch', architectureNick Clifton1-5/+0
of input file, if not specified in input file itself; all callers updated; `binary_architecture' hack removed. (copy_archive, copy_file): New parameter `input_arch', for `copy_object' usage. (copy_main): Accept `-B' (`--binary-architecture') option also for any arch-less input ifile format, not only `binary'; remove bfd_external_binary_architecture hack; instead, add `input_arch' to calls to `copy_file'. * windres.c, windmc.c : Obsolete and useless external references to `bfd_external_binary_architecture' or `bfd_external_machine' removed. * binary.c (binary_object_p): Remove bfd_external_binary_architecture hack. objcopy `-B' (`--binary-architecture') option is now handled in a generic way.
2009-09-02update copyright datesAlan Modra1-2/+2
2009-02-092009-02-09 Kai Tietz <kai.tietz@onevision.com>Kai Tietz1-1/+1
* windres.c (set_endianess): Copy name without leading '-'.
2009-01-062009-01-06 Kai Tietz <kai.tietz@onevision.com>Kai Tietz1-11/+35
* windres.c (set_endianess): Get architecture name for internal target names like "pe-arm-wince-little". (find_arch_match): New helper. * ChangeLog: Reset it. * ChangeLog-2008: Moved old ChangeLog.
2008-10-21Remove unnecessary casts on obstack_alloc invocations.Alan Modra1-2/+2
2008-01-09PR binutils/55326Nick Clifton1-8/+17
* bucomm.c (list_supported_architectures): Free architecture list after use. * windres.c (set_endianess): Likewise. * windmc.c (set_endianess): Likewise.
2007-10-082007-10-08 Carlos O'Donell <carlos@codesourcery.com>Carlos O'Donell1-0/+6
* resrc.c (read_rc_file): Rename e to edit, and c to dir. Pass dir to windres_add_include_dir. Add comments. (close_input_stream): Check pclose error, and call fatal if the preprocessor failed. * windres.c (windres_add_include_dir): Assert that p is non-NULL, and not an empty string.
2007-07-05Change sources over to using GPLv3Nick Clifton1-1/+1
2007-07-05* resrc.c: (read_rc_file): Add include path of user passed rc input file.Nick Clifton1-11/+15
* windres.c: (windres_add_include_dir): New. (main): Use of windres_add_include_dir. * windres.h: (windres_add_include_dir): Add prototype.
2007-06-18* rclex.c: (cpp_line): Add code_page pragma support.Nick Clifton1-1/+17
* windres.c: (usage, long_options, main): Add new option --codepage or -c. * winduni.c: (wind_default_codepage, wind_current_codepage): New. (unicode_from_ascii, ascii_from_unicode): Use wind_current_codepage as codepage parameter. (unicode_print): Print 4 characters for hexadecimal values in unicode strings. * winduni.h: (wind_default_codepage, wind_current_codepage): Export. * doc/binutils.texi: Document new option. * NEWS: Mention new feature.
2007-05-23Updated windres toolNick Clifton1-50/+416
2007-04-26bfd/Alan Modra1-5/+2
Many files: Include sysdep.h before bfd.h. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. binutils/ * bucumm.h: Split off host dependencies to.. * sysdep.h: ..here. Many files: Include sysdep.h. Remove duplicate headers and reorder. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. ld/ Many files: Include sysdep.h first. Remove duplicate headers. * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. opcodes/ * Makefile.am: Run "make dep-am". * Makefile.in: Regenerate. * ns32k-dis.c: Include sysdep.h first.
2007-02-17top level:Joseph Myers1-2/+2
2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Fix quoting. * configure: Regenerate. bfd: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.in (--with-pkgversion): New option. * configure: Regenerate. * Makefile.am (bfdver.h): Substitute for @bfd_version_package@. * Makefile.in: Regenerate. * version.h (BFD_VERSION_STRING): Define using @bfd_version_package@. bfd/doc: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * Makefile.in: Regenerate. binutils: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.in (--with-bugurl): New option. * configure: Regenerate. * Makefile.am (REPORT_BUGS_TO): Define. (INCLUDES): Define REPORT_BUGS_TO. Regenerate dependencies. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * bucomm.h: Remove include of bin-bugs.h. * addr2line.c (usage): Don't print empty REPORT_BUGS_TO. * ar.c (usage): Pass s to list_supported_targets. Don't print empty REPORT_BUGS_TO. * coffdump.c (show_usage): Don't print empty REPORT_BUGS_TO. * cxxfilt.c (usage): Print bug url when giving help. * dlltool.c (usage): Likewise. * dllwrap.c (usage): Likewise. * nlmconv.c (show_usage): Don't print empty REPORT_BUGS_TO. * nm.c (usage): Likewise. * objcopy.c (copy_usage, strip_usage): Likewise. * objdump.c (usage): Likewise. * readelf.c ((usage): Likewise. Add STREAM argument. Adjust callers. * size.c (usage): Don't print empty REPORT_BUGS_TO. * srconv.c (show_usage): Likewise. * strings.c (usage): Likewise. * sysdymp.c (show_usage): Likewise. * windres.c (usage): Likewise. gas: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.in (--with-bugurl): New option. * configure: Regenerate. * dep-in.sed: Remove bin-bugs.h. * Makefile.am (REPORT_BUGS_TO): Define. (INCLUDES): Define REPORT_BUGS_TO. (DEP_INCLUDES): Likewise. ($(OBJS)): No longer depend on bin-bugs.h. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate. * as.c (show_usage): Don't print empty REPORT_BUGS_TO. * as.h: Remove include of bin-bugs.h. gprof: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.in (--with-pkgversion, --with-bugurl): New options. * configure: Regenerate. * Makefile.am (PKGVERSION, REPORT_BUGS_TO): Define. (INCLUDES): Define PKGVERSION and REPORT_BUGS_TO. Regenerate dependencies. * Makefile.in: Regenerate. * gprof.c (usage): Don't print empty REPORT_BUGS_TO. (main): Include PKGVERSION in version output. * gprof.h: Remove include of bin-bugs.h. include: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * bin-bugs.h: Remove. ld: 2007-02-17 Mark Mitchell <mark@codesourcery.com> Nathan Sidwell <nathan@codesourcery.com> Vladimir Prus <vladimir@codesourcery.com Joseph Myers <joseph@codesourcery.com> * configure.in (--with-bugurl): New option. * configure: Regenerate. * Makefile.am (REPORT_BUGS_TO): Define. (INCLUDES): Define REPORT_BUGS_TO. Regenerate dependencies. * Makefile.in: Regenerate. * ld.h: Remove include of bin-bugs.h. * lexsup.c (help): Don't print empty REPORT_BUGS_TO.
2005-10-03 * addr2line.c (usage): Document @file.Mark Mitchell1-0/+1
* ar.c (usage): Likewise. * coffdump (usage): Likewise. * cxxfilt.c (usage): Likewise. * dlltool.c (usage): Likewise. * dllwrap.c (usage): Likewise. * nlmconv.c (usage): Likewise. * nm.c (usage): Likewise. * objcopy.c (usage): Likewise. * objdump.c (usage): Likewise. * readelf.c (usage): Likewise. * size.c (usage): Likeise. * srconv.c (usage): Likewise. * strings.c (usage): Likewise. * windres.c (usage): Likewise. * doc/binutils.texi: Add section on common options.
2005-09-30 * dlltool.c (main): Fix typo.Mark Mitchell1-1/+1
* windres.c (main): Likewise.
2005-09-30 * addr2line.c (main): Likewise.Mark Mitchell1-0/+2
* ar.c (main): Likewise. * coffdump.c (main): Likewise. * cxxfilt.c (main): Likewise. * dlltool.c (main): Likewise. * dllwrap.c (main): Likewise. * nlmconv.c (main): Likewise. * nm.c (main): Likewise. * objcopy.c (main): Likewise. * objdump.c (main): Likewise. * readelf.c (main): Likewise. * size.c (main): Likeiwse. * srcconv.c (main): Likewise. * strings.c (main): Likewise. * sysdump.c (main): Likewise. * sysinfo.c (main): Likewise. * windres.c (main): Likewise. * ldmain.c (main): Use expandargv. * gprof.c (main): Use expandargv. * as.c (main): Use expandargv.
2005-05-08Update FSF addressNick Clifton1-2/+2
2005-03-03update copyright datesAlan Modra1-1/+1
2005-02-17 * deflex.l (YY_NO_UNPUT): Define.Alan Modra1-2/+6
* rclex.l (YY_NO_UNPUT): Define. * rcparse.y (null_unichar): New static var. (res_null_text): Use it rather than attempting to init from wchar_t. * windres.c: Include assert.h and time.h before getopt.h. Include config.h and unistd.h too.
2004-10-18strings.c (usage): Place radix values for -t option into the correct order.Nick Clifton1-1/+1
objcopy.c (add_redefine_syms_file): Change error messages to use <filename>:<linenumber>: format for easier parsing by automatic tools. srconv.c (show_usage): Fix spelling typo. windres.c (format_from_filename): Suggest the use of -J instead of -I if the file type cannot be determined.
2003-10-27 * ChangeLog: Fix typos.Kazu Hirata1-1/+1
* ChangeLog-9197: Likewise. * ChangeLog-9899: Likewise. * NEWS: Likewise. * ar.c: Fix comment typos. * arsup.c: Likewise. * coffgrok.c: Likewise. * debug.c: Likewise. * debug.h: Likewise. * dlltool.c: Likewise. * ieee.c: Likewise. * nm.c: Likewise. * objdump.c: Likewise. * prdbg.c: Likewise. * readelf.c: Likewise. * resrc.c: Likewise. * sysinfo.y: Likewise. * windres.c: Likewise.
2003-09-14 * addr2line.c: Convert to ISO C90 prototypes, change PTR, removeAndreas Jaeger1-78/+40
unneeded (void *) casts. * ar.c: Likewise. * arlex.l: Likewise. * arparse.y: Likewise. * arsup.c: Likewise. * binemul.c: Likewise. * binemul.h: Likewise. * bucomm.c: Likewise. * bucomm.h: Likewise. * budbg.h: Likewise. * budemang.c: Likewise. * budemang.h: Likewise. * coffdump.c: Likewise. * coffgrok.c: Likewise. * cxxfilt.c: Likewise. * debug.c: Likewise. * debug.h: Likewise. * deflex.l: Likewise. * dlltool.c: Likewise. * dlltool.h: Likewise. * dllwrap.c: Likewise. * emul_aix.c: Likewise. * filemode.c: Likewise. * ieee.c: Likewise. * nlmconv.c: Likewise. * nlmconv.h: Likewise. * nlmheader.y: Likewise. * nm.c: Likewise. * prdbg.c: Likewise. * rclex.l: Likewise. * rcparse.y: Likewise. * rdcoff.c: Likewise. * rddbg.c: Likewise. * rename.c: Likewise. * resbin.c: Likewise. * rescoff.c: Likewise. * resrc.c: Likewise. * size.c: Likewise. * srconv.c: Likewise. * stabs.c: Likewise. * strings.c: Likewise. * sysdump.c: Likewise. * sysinfo.y: Likewise. * syslex.l: Likewise. * unwind-ia64.c: Likewise. * unwind-ia64.h: Likewise. * version.c: Likewise. * windres.c: Likewise. * windres.h: Likewise. * winduni.c: Likewise. * wrstabs.c: Likewise.
2003-04-23Accept -fo as an alias for -oNick Clifton1-29/+47
2003-04-22Rename -I to -J. Deprecate old use of -I, but leave it enabled for now.Nick Clifton1-15/+25
2003-04-05Add -l for compatibility with wrc, and rc. Use the short option as a key forNick Clifton1-13/+8
long options that have a synonymous short option.
2003-04-03Add -U for compatibility with wrc, rc, and cpp. Just pass the -U option downNick Clifton1-24/+20
to the preprocessor.
2003-04-01* windres.c (usage): Report -r option.Christopher Faylor1-1/+6
(main): Ignore the -r option. * doc/binutils.texi: Add -r to the list of options.
2002-05-05 * dlltool.c (process_def_file): Add missing prototype.Alan Modra1-3/+1
(new_directive, assemble_file, main): Likewise. (process_def_file, new_directive): Make static. (inform): Rewrite using VA_FIXEDARG. * dllwrap.c (mybasename): Add missing prototype. (strhash, main): Likewise. (inform): Rewrite using VA_FIXEDARG. (warn): Likewise. (cleanup_and_exit): Use old style function definition. (strhash): Likewise. * windres.c (define_resource): Use one memset to clear all of struct res_resource.
2002-04-09Set default LANGUAGE to english/us.Nick Clifton1-1/+6
2002-01-23Tidy up formatting of --help output.Nick Clifton1-28/+30
2001-09-19Locale changes from Bruno Haible <haible@clisp.cons.org>.H.J. Lu1-7/+10
2001-03-13Fix typos in ChangeLogs and update copyright noticesNick Clifton1-1/+1
2000-04-07A mostly cosmetic tidy up of warnings and error message reporting.Alan Modra1-2/+2
2000-04-04Move translated part of bug report string back into .c files soAlan Modra1-1/+1
xgettext can find it. Regnerate .pot files.
2000-04-03Move bug report string to one place.Alan Modra1-1/+1
2000-01-07Apply Mumit Khan's patch to allow temporary file for process interconnectionNick Clifton1-3/+20
1999-06-07 * windres.c (usage): Fix typo.Andreas Schwab1-1/+1
1999-05-25* windres.c: add verbose optionDJ Delorie1-2/+13
(main): process verbose option * resrc.c (look_for_default): new. Look for the default preprocessor in a given location. (read_rc_file): for foo/bar-windres, look for foo/bar-gcc, foo/gcc (in case of foo/windres), and then gcc (the old default).
1999-05-111999-05-10 DJ Delorie <dj@cygnus.com>DJ Delorie1-9/+43
* windres.c (quot): Quote shell metacharacters in a string (main): quote parameters to cpp that might have metacharacters in them. Allow -D as an alias for --define to allow for sharing make macros with gcc. * objdump.c (dump_reloc_set): don't core if howto->name is NULL * Makefile.am: Give rescoff.c a cpu-specific -D so it can set the correct BFD. * Makefile.in: ditto * rescoff.c (write_coff_file): Set the correct BFD
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+947