aboutsummaryrefslogtreecommitdiff
path: root/binutils/windres.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-04Update year range in copyright notice of binutils filesAlan Modra1-1/+1
Adds two new external authors to etc/update-copyright.py to cover bfd/ax_tls.m4, and adds gprofng to dirs handled automatically, then updates copyright messages as follows: 1) Update cgen/utils.scm emitted copyrights. 2) Run "etc/update-copyright.py --this-year" with an extra external author I haven't committed, 'Kalray SA.', to cover gas testsuite files (which should have their copyright message removed). 3) Build with --enable-maintainer-mode --enable-cgen-maint=yes. 4) Check out */po/*.pot which we don't update frequently.
2023-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
The newer update-copyright.py fixes file encoding too, removing cr/lf on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
2022-01-02Update year range in copyright notice of binutils filesAlan Modra1-1/+1
The result of running etc/update-copyright.py --this-year, fixing all the files whose mode is changed by the script, plus a build with --enable-maintainer-mode --enable-cgen-maint=yes, then checking out */po/*.pot which we don't update frequently. The copy of cgen was with commit d1dd5fcc38ead reverted as that commit breaks building of bfp opcodes files.
2021-05-10Restore old behaviour of windres so that options containing spaces are not ↵Thomas Wolff1-25/+1
enclosed in double quotes. PR 4356 PR 26865 PR 27594 * windres.c (quot): Revert previous delta. Do not use double quotes when spaces are detected in options. * doc/binutils.texi (windres): Remove suggestion that the --preprocessor option can take arguments.
2021-04-05C99 binutils configuryAlan Modra1-3/+1
* configure.ac: Assume long long is available. Don't test for strings.h, stdlib.h, limits.h, locale.h, or wchar.h. Check inttypes.h, stdint.h, sys/stat.h and sys/types.h. Don't check for strcoll, setlocale, setmode or location of time_t. Don't check for fprintf, getenv, snprintf, strnlen, strstr or vsnprintf decls. (AC_ISC_POSIX, AXC_HEADER_STRING, AC_FUNC_ALLOCA): Don't invoke. * sysdep.h: Don't include alloca-conf.h, include config.h instead. Test HAVE_SYS_TYPES_H and reorder includes. Include limits.h, locale.h, string.h and stdlib.h unconditionally. Remove various fallback declarations. Assume long long is available. * addr2line.c: Don't test HAVE_SETLOCALE. * ar.c: Likewise. * coffdump.c: Likewise. * dlltool.c: Likewise. * dllwrap.c: Likewise. * elfedit.c: Likewise. * nm.c: Likewise. * objcopy.c: Likewise. * objdump.c: Likewise. * readelf.c: Likewise. * size.c: Likewise. * srconv.c: Likewise. * strings.c: Likewise. * sysdump.c: Likewise. * windmc.c: Likewise. * windres.c: Likewise. * bucomm.c: Don't test HAVE_TIME_T_IN_TIME_H or HAVE_TIME_T_IN_TYPES_H. * dwarf.c: Include limits.h unconditionally. Assume long long is available. * nm.c: Don't test HAVE_STRCOLL. * readelf.c: Don't test HAVE_WCHAR_H. * strings.c: Assume long long is available. * syslex.l: Include string.h unconditionally. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * doc/Makefile.in: Regenerate.
2021-03-31Use bool in binutilsAlan Modra1-3/+3
* sysdep.h (POISON_BFD_BOOLEAN): Define. * addr2line.c, * ar.c, * arsup.c, * bfdtest2.c, * binemul.c, * binemul.h, * bucomm.c, * bucomm.h, * budbg.h, * coffgrok.c, * debug.c, * debug.h, * dlltool.c, * dwarf.c, * dwarf.h, * elfedit.c, * emul_aix.c, * mclex.c, * nm.c, * objcopy.c, * objdump.c, * od-macho.c, * prdbg.c, * rdcoff.c, * rddbg.c, * readelf.c, * rename.c, * stabs.c, * strings.c, * windint.h, * windmc.c, * windmc.h, * windres.c, * winduni.c, * wrstabs.c: Replace bfd_boolean with bool, FALSE with false, and TRUE with true throughout.
2021-03-29binutils int vs bfd_boolean fixesAlan Modra1-1/+1
* objdump.c (process_links): Use type int. * readelf.c (request_dump): Don't increment do_dump, set it. * windint.h (target_is_bigendian): Use type bfd_boolean. * windmc.c (target_is_bigendian): Likewise. * windres.c (target_is_bigendian): Likewise.
2021-01-28Improve windres's handling of pathnames containing special characters on ↵Eli Zaretskii1-3/+28
Windows platforms. PR 4356 * windres.c (quot): Use double quotes to protect strings on Windows platforms.
2021-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2020-11-27Allow spaces in the name of the external preprocessor used by windres.Nick Clifton1-1/+7
PR 26865 * windres.c (main): If the preprocessor name includes spaces, ensure that it is quoted.
2020-07-09Update the Windows Resource compiler (windres) to support the OWNERDRAW and ↵Nick Clifton1-0/+2
BITMAP menuitem flags. binutils* rclex.c: Add OWNERDRAW keyword. * rcparse.y: Add OWNERDRAW token. (menuitem_flag) Add BITMAP and OWNERDRAW entries. * resrc.c (write_rc_menuitems): Add support for OWNERDRAW and BITMAP flags. * windres.c (extended_menuitems): Likewise. * testsuite/binutils-all/windres/menuitem_flags.rc: New test.
2020-05-21Replace "if (x) free (x)" with "free (x)", binutilsAlan Modra1-2/+1
* addr2line.c: Replace "if (x) free (x)" with "free (x)" throughout. * dlltool.c: Likewise. * elfcomm.c: Likewise. * rddbg.c: Likewise. * readelf.c: Likewise. * stabs.c: Likewise. * windmc.c: Likewise. * windres.c: Likewise. * wrstabs.c: Likewise.
2020-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2019-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2018-10-15BFD_INIT_MAGICAlan Modra1-1/+2
This patch performs a run-time test that a shared libbfd.so has been compiled with the same size bfd_vma as that of apps using the library. On a 32-bit host it is easily possible to have one libbfd.so compiled to support 64-bit targets (or configured with --enable-64-bit-bfd) while another only supports 32-bit targets. The two libraries will have differently sized bfd_vma types, and if the wrong one is loaded all sorts of weird behaviour might be seen. bfd/ PR 23534 * init.c (BFD_INIT_MAGIC): Define. (bfd_init): Return BFD_INIT_MAGIC. bfd-in2.h: Regenerate. binutils/ PR 23534 * addr2line.c (main): Exit with fatal error if bfd_init returns an unexpected value. * ar.c (main): Likewise. * dlltool.c (identify_dll_for_implib): Likewise. * nm.c (main): Likewise. * objcopy.c (main): Likewise. * objdump.c (main): Likewise. * size.c (main): Likewise. * strings.c (main): Likewise. * windmc.c (main): Likewise. * windres.c (main): Likewise. gas/ PR 23534 * as.c (main): Exit with fatal error if bfd_init returns an unexpected value. ld/ PR 23534 * ldmain.c (main): Exit with fatal error if bfd_init returns an unexpected value.
2018-01-03Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-08-12Remove trailing spaces in binutilsH.J. Lu1-8/+8
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.