public inbox for cygwin-apps-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-apps-cvs@sourceware.org Subject: [rebase - The rebase tool, core of the automatic rebase facility during postinstall] branch master, updated. 06def3bdcc38d61bf607a040ecc084eae06cbedf Date: Tue, 19 Jul 2022 12:34:17 +0000 (GMT) [thread overview] Message-ID: <20220719123417.26D253858439@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/rebase.git;h=06def3bdcc38d61bf607a040ecc084eae06cbedf commit 06def3bdcc38d61bf607a040ecc084eae06cbedf Author: Corinna Vinschen <corinna@vinschen.de> Date: Tue Jul 19 14:30:14 2022 +0200 Bump to version 4.6.0 Signed-off-by: Corinna Vinschen <corinna@vinschen.de> https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/rebase.git;h=06832109cadd01dd1889a41cf777bac356818d13 commit 06832109cadd01dd1889a41cf777bac356818d13 Author: Christian Franke <christian.franke@t-online.de> Date: Tue Jul 19 10:40:55 2022 +0200 Fix index after removing missing DLL from list https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/rebase.git;h=40c1886f024becc9a246c4ddd109a0bec7b6e914 commit 40c1886f024becc9a246c4ddd109a0bec7b6e914 Author: Christian Franke <christian.franke@t-online.de> Date: Tue Jul 19 10:36:20 2022 +0200 Print list of DLLs which still overlap after rebasing Diff: --- configure.ac | 2 +- rebase.c | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8bdffa2..91415d5 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # configure.ac for rebase AC_PREREQ([2.64]) -AC_INIT([rebase], [4.5.0], [cygwin@cygwin.com]) +AC_INIT([rebase], [4.6.0], [cygwin@cygwin.com]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([peflags.c]) AC_PREFIX_DEFAULT([/usr]) diff --git a/rebase.c b/rebase.c index 1f9f74b..7417d4d 100644 --- a/rebase.c +++ b/rebase.c @@ -47,6 +47,7 @@ BOOL load_image_info (); BOOL merge_image_info (); BOOL collect_image_info (const char *pathname); void print_image_info (); +static void print_overlapped (); BOOL rebase (const char *pathname, ULONG64 *new_image_base, BOOL down_flag); void parse_args (int argc, char *argv[]); unsigned long long string_to_ulonglong (const char *string); @@ -323,6 +324,10 @@ main (int argc, char *argv[]) } fprintf (stderr, " %s\n", img_info_list[i].name); } + /* Print list of DLLs which still overlap. This could occur if DLLs are + not rebaseable or if --merge-files is used incorrectly. */ + if (img_info_size) + print_overlapped (); if (save_image_info () < 0) return 2; } @@ -794,6 +799,7 @@ merge_image_info () memmove (overlaps + i, overlaps + i + 1, img_info_size - i - 1); --img_info_rebase_start; --img_info_size; + --i; continue; } slot_size = roundup2 (cur_size, ALLOCATION_SLOT); @@ -1149,6 +1155,39 @@ print_image_info () } } +static void +print_overlapped () +{ + BOOL header; + int i; + char overlaps[img_info_size]; + memset (overlaps, 0, img_info_size); + qsort (img_info_list, img_info_size, sizeof (img_info_t), img_info_cmp); + for (header = FALSE, i = 0; i < img_info_size; ++i) + { + int j; + if (img_info_list[i].flag.needs_rebasing) + continue; /* Rebase failed. */ + for (j = i + 1; j < img_info_size; ++j) + { + if (img_info_list[j].flag.needs_rebasing) + continue; /* Rebase failed. */ + if (img_info_list[i].base + img_info_list[i].slot_size + offset + <= img_info_list[j].base) + break; + overlaps[i] = overlaps[j] = 1; + } + if (!overlaps[i]) + continue; + if (!header) + { + fputs ("\nThe following DLLs still overlap:\n", stderr); + header = TRUE; + } + fprintf (stderr, " %s\n", img_info_list[i].name); + } +} + BOOL rebase (const char *pathname, ULONG64 *new_image_base, BOOL down_flag) {
reply other threads:[~2022-07-19 12:34 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220719123417.26D253858439@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-apps-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).