From: Pawel Wieczorkiewicz <wipawel@amazon.de>
To: xen-devel@lists.xen.org
Cc: mpohlack@amazon.de, ross.lagerwall@citrix.com,
Pawel Wieczorkiewicz <wipawel@amazon.de>,
konrad.wilk@oracle.com
Subject: [livepatch-build-tools 4/4] livepatch-build: Handle newly created object files
Date: Mon, 8 Apr 2019 08:32:24 +0000 [thread overview]
Message-ID: <20190408083224.104802-4-wipawel@amazon.de> (raw)
In-Reply-To: <20190408083224.104802-1-wipawel@amazon.de>
Up to now the livepatch-build ignores newly created object files.
When patch applies new .c file and augments its Makefile to build it
the resulting object file is not taken into account for final linking
step.
Such newly created object files can be detected by comparing patched/
and original/ directories and copied over to the output directory for
the final linking step.
Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reviewed-by: Andra-Irina Paraschiv <andraprs@amazon.com>
Reviewed-by: Bjoern Doebel <doebel@amazon.de>
Reviewed-by: Norbert Manthey <nmanthey@amazon.de>
---
livepatch-build | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/livepatch-build b/livepatch-build
index 796838c..b43730c 100755
--- a/livepatch-build
+++ b/livepatch-build
@@ -146,6 +146,12 @@ function create_patch()
fi
done
+ NEW_FILES=$(comm -23 <(find patched -type f -name '*.o' | cut -f2- -d'/' | sort -u) <(find original -type f -name '*.o' | cut -f2- -d'/' | sort -u))
+ for i in $NEW_FILES; do
+ cp "patched/$i" "output/$i"
+ CHANGED=1
+ done
+
if [[ $ERROR -ne 0 ]]; then
die "$ERROR error(s) encountered"
fi
--
2.16.5
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrer: Christian Schlaeger, Ralf Herbrich
Ust-ID: DE 289 237 879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-04-08 8:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 8:32 [livepatch-build-tools 1/4] livepatch-gcc: Allow toolchain command with versions Pawel Wieczorkiewicz
2019-04-08 8:32 ` [livepatch-build-tools 2/4] livepatch-gcc: Ignore built_in.o and prelink.o object files Pawel Wieczorkiewicz
2019-04-29 12:27 ` Ross Lagerwall
2019-04-08 8:32 ` [livepatch-build-tools 3/4] livepatch-build: Do not follow every symlink for patch file Pawel Wieczorkiewicz
2019-04-29 12:40 ` Ross Lagerwall
2019-04-29 15:24 ` Wieczorkiewicz, Pawel
2019-04-08 8:32 ` Pawel Wieczorkiewicz [this message]
2019-04-29 12:53 ` [livepatch-build-tools 4/4] livepatch-build: Handle newly created object files Andrew Cooper
2019-04-29 13:53 ` Ross Lagerwall
2019-04-29 13:53 ` Ross Lagerwall
2019-04-29 15:43 ` Wieczorkiewicz, Pawel
2019-04-29 12:27 ` [livepatch-build-tools 1/4] livepatch-gcc: Allow toolchain command with versions Ross Lagerwall
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=20190408083224.104802-4-wipawel@amazon.de \
--to=wipawel@amazon.de \
--cc=konrad.wilk@oracle.com \
--cc=mpohlack@amazon.de \
--cc=ross.lagerwall@citrix.com \
--cc=xen-devel@lists.xen.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: link
Be 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 NNTP newsgroup(s).