From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 054123858D1E; Tue, 18 Apr 2023 07:38:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 054123858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1681803519; bh=iD5ndltDgwa69JZYY0Gjjvp8gZ0qHbixlcUkH25Q6WI=; h=To:Subject:Date:From:From; b=FJq4biPMgTbIX9OY366DJLoV/e0ZfCruJQgzaSQA6mLSdr5BBg9ONzMQunDjMao+0 mGLWiNA7d59rv2I8TGclQ0+nStO0L3JS9cFGIGVLf9NR41cQS1gxn1ZxzsXHk6acuZ nqwqRlQ37Sgd8ilcDE3pddF4WkF3kULKlxsslFzQ= To: cygwin-apps-cvs@sourceware.org Subject: [rebase - The rebase tool, core of the automatic rebase facility during postinstall] branch master, updated. 73c83a42d2efafd99fbee28b037fc28e75c5268b X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 8e3e0029fd8a0e6cbc4ee4a0969f21220d189c1d X-Git-Newrev: 73c83a42d2efafd99fbee28b037fc28e75c5268b Message-Id: <20230418073839.054123858D1E@sourceware.org> Date: Tue, 18 Apr 2023 07:38:38 +0000 (GMT) From: Corinna Vinschen List-Id: https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/rebase.git;h=73c83a42d2efafd99fbee28b037fc28e75c5268b commit 73c83a42d2efafd99fbee28b037fc28e75c5268b Author: Corinna Vinschen Date: Tue Apr 18 09:37:26 2023 +0200 Bump to version 4.6.3 Signed-off-by: Corinna Vinschen https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/rebase.git;h=6677e20b821f511352046234c9e3a20cd102d403 commit 6677e20b821f511352046234c9e3a20cd102d403 Author: Christoph Reiter via Cygwin-apps Date: Mon Apr 17 20:40:34 2023 +0200 peflags: add support for IMAGE_DLLCHARACTERISTICS_GUARD_CF This allows for setting, clearing, and displaying the value of the "control flow guard" dll characteristics flag. The flag for MSVC is called "/guard:cf" and the macro ends with "GUARD_CF". To keep things consistent, it would make sense to name the option "guard-cf". However, there's already "-c"/"control-flow-guard" in genpeimg for this flag, and genpeimg shares all other options with peflags so far. So, follow genpeimg and go with "-c" and "--control-flow-guard". This is motivated by mingw-w64 and llvm v16 gaining support for CFG (Control Flow Guard). Diff: --- configure.ac | 2 +- peflags.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 0ab6b53943bd..d06f8d5f7746 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # configure.ac for rebase AC_PREREQ([2.64]) -AC_INIT([rebase], [4.6.2], [cygwin@cygwin.com]) +AC_INIT([rebase], [4.6.3], [cygwin@cygwin.com]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([peflags.c]) AC_PREFIX_DEFAULT([/usr]) diff --git a/peflags.c b/peflags.c index b1cd7a851e43..93eaa0b81577 100644 --- a/peflags.c +++ b/peflags.c @@ -121,7 +121,7 @@ static const symbolic_flags_t pe_symbolic_flags[] = { CF(0x0800, no-bind), /*CF(0x1000, reserved_0x1000),*/ CF(0x2000, wdmdriver), -/*CF(0x4000, reserved_0x4000),*/ + CF(0x4000, control-flow-guard), CF(0x8000, tsaware), {0, 0, 0} }; @@ -182,6 +182,7 @@ sizeof_values_t sizeof_vals[5] = { static struct option long_options[] = { {"dynamicbase", optional_argument, NULL, 'd'}, {"high-entropy-va", optional_argument, NULL, 'e'}, + {"control-flow-guard", optional_argument, NULL, 'c'}, {"forceinteg", optional_argument, NULL, 'f'}, {"nxcompat", optional_argument, NULL, 'n'}, {"no-isolation", optional_argument, NULL, 'i'}, @@ -204,7 +205,7 @@ static struct option long_options[] = { {NULL, no_argument, NULL, 0} }; static const char *short_options - = "d::e::f::n::i::s::b::W::t::w::l::S::x::X::y::Y::z::T:vhV"; + = "d::e::c::f::n::i::s::b::W::t::w::l::S::x::X::y::Y::z::T:vhV"; static void short_usage (FILE *f); static void help (FILE *f); @@ -706,6 +707,11 @@ parse_args (int argc, char *argv[]) optarg, IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA); break; + case 'c': + handle_pe_flag_option (long_options[option_index].name, + optarg, + IMAGE_DLLCHARACTERISTICS_GUARD_CF); + break; case 'n': handle_pe_flag_option (long_options[option_index].name, optarg, @@ -1079,6 +1085,8 @@ help (FILE *f) " -e,\n" " --high-entropy-va [BOOL] Image is compatible with 64-bit address space\n" " layout randomization (ASLR).\n" +" -c,\n" +" --control-flow-guard [BOOL] Image supports Control Flow Guard.\n" " -f, --forceinteg [BOOL] Code integrity checks are enforced.\n" " -n, --nxcompat [BOOL] Image is compatible with data execution\n" " prevention (DEP).\n"