Skip to content

Commit

Permalink
Merge branch 'release-1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
acolomb committed Aug 1, 2023
2 parents 779c877 + 52e3c7c commit 2be1bd1
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 10 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2023-08-01 André Colomb <[email protected]>

* Fix exit code when writing to the output image file was
successful. The number of bytes written was returned and used as
exit code, when it should be zero on success and non-zero only on
error.
* Fix building without the custom post-processor module. An
undefined reference regarding the demo --skip-checksum error would
otherwise fail the build.

* Release version 1.2

2023-07-03 André Colomb <[email protected]>

* Extend the --print option to accept a "defines" format
Expand Down
16 changes: 11 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2014, 2015, 2016, 2019, 2022 Andre Colomb
# Copyright (C) 2014, 2015, 2016, 2019, 2022, 2023 Andre Colomb
#
# This file is part of elf-mangle.
#
Expand All @@ -17,7 +17,7 @@
# <http://www.gnu.org/licenses/>.


AC_INIT([elf-mangle],[1.1],[[email protected]])
AC_INIT([elf-mangle],[1.2],[[email protected]])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/elf-mangle.c])
AC_CONFIG_AUX_DIR([.])
Expand Down Expand Up @@ -147,7 +147,9 @@ AC_ARG_ENABLE([custom-options],
[AS_HELP_STRING([--enable-custom-options],
[Build extension module with custom options])],
[AS_CASE([$enableval],
[yes], [custom_options=yes],
[yes], [custom_options=yes
AC_DEFINE([WITH_CUSTOM_OPTIONS], [1],
[Building extension module with custom options])],
[no], [custom_options=no],
[AC_MSG_ERROR([bad value ${enableval} for --enable-custom-options])])
],
Expand All @@ -161,7 +163,9 @@ AC_ARG_ENABLE([custom-fields],
[AS_HELP_STRING([--enable-custom-fields],
[Build extension module with custom known fields])],
[AS_CASE([$enableval],
[yes], [custom_fields=yes],
[yes], [custom_fields=yes
AC_DEFINE([WITH_CUSTOM_FIELDS], [1],
[Building extension module with custom known fields])],
[no], [custom_fields=no],
[AC_MSG_ERROR([bad value ${enableval} for --enable-custom-fields])])
],
Expand All @@ -175,7 +179,9 @@ AC_ARG_ENABLE([custom-post-process],
[AS_HELP_STRING([--enable-custom-post-process],
[Build extension module with custom post-processors])],
[AS_CASE([$enableval],
[yes], [custom_post_process=yes],
[yes], [custom_post_process=yes
AC_DEFINE([WITH_CUSTOM_POST_PROCESS], [1],
[Building extension module with custom post-processors])],
[no], [custom_post_process=no],
[AC_MSG_ERROR([bad value ${enableval} for --enable-custom-post-process])])
],
Expand Down
8 changes: 4 additions & 4 deletions po/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: elf-mangle 0.7\n"
"Report-Msgid-Bugs-To: [email protected]\n"
"POT-Creation-Date: 2023-07-03 01:23+0200\n"
"POT-Creation-Date: 2023-08-01 11:24+0200\n"
"PO-Revision-Date: 2023-07-03 01:25+0200\n"
"Last-Translator: André Colomb <[email protected]>\n"
"Language-Team: German\n"
Expand Down Expand Up @@ -88,16 +88,16 @@ msgstr "NUMMER"
msgid "Override system serial number in output"
msgstr "System-Seriennummer in Ausgabe überschreiben"

#: src/custom_options.c:72
#: src/custom_options.c:73
msgid "Skip CRC update post-processor"
msgstr "Anpassung der Prüfsumme in Post-Prozessor überspringen"

#: src/custom_options.c:113
#: src/custom_options.c:115
#, c-format
msgid "Invalid serial number `%s' specified."
msgstr "Ungültige Seriennummer '%s' angegeben."

#: src/custom_options.c:138
#: src/custom_options.c:142
msgid "Example-specific options:"
msgstr "Optionen spezifisch für Beispiel:"

Expand Down
4 changes: 4 additions & 0 deletions src/custom_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ static const struct argp_option dummy_options[] =
{
{ "set-serial", OPT_SET_SERIAL, N_("NUMBER"), 0,
N_("Override system serial number in output"), 0 },
#if WITH_CUSTOM_POST_PROCESS
{ "skip-checksum", OPT_SKIP_CHECKSUM, 0, 0,
N_("Skip CRC update post-processor"), 0 },
#endif
{ 0 }
};

Expand Down Expand Up @@ -114,9 +116,11 @@ dummy_parse_opt(
}
break;

#if WITH_CUSTOM_POST_PROCESS
case OPT_SKIP_CHECKSUM:
post_process_disable_checksum_update();
break;
#endif

default:
return ARGP_ERR_UNKNOWN;
Expand Down
3 changes: 2 additions & 1 deletion src/elf-mangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ process_final_map(const tool_config* restrict config,
if (config->image_out) r = image_write_file(
config->image_out, symbol_map_blob_address(map), symbol_map_blob_size(map),
config->format_out);
if (r < 0) return r;

return r;
return 0;
}


Expand Down

0 comments on commit 2be1bd1

Please sign in to comment.