From: Pawel Wieczorkiewicz Date: Mon, 1 Oct 2018 12:30:24 +0000 (+0000) Subject: create-diff-object: Add is_special_section() helper function X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ef3437d3c300ededc6f66f13d08d1083109b6f58;p=people%2Fwipawel%2Flivepatch-build-tools create-diff-object: Add is_special_section() helper function This function determines, based on the given section name, if the sections belongs to the special sections category. Add more special sections to special_sections[] along with a new undefined_group_size() helper function returning 0 (undefined). New special sections are: .altinstr_replacement. Signed-off-by: Pawel Wieczorkiewicz Reviewed-by: Andra-Irina Paraschiv Reviewed-by: Bjoern Doebel Reviewed-by: Norbert Manthey --- diff --git a/create-diff-object.c b/create-diff-object.c index 4699ba0..0df3fea 100644 --- a/create-diff-object.c +++ b/create-diff-object.c @@ -1045,6 +1045,18 @@ static struct special_section special_sections[] = { {}, }; +static int is_special_section(const struct section *sec) +{ + struct special_section *special; + + for (special = special_sections; special->name; special++) { + if (!strcmp(sec->name, special->name)) + return true; + } + + return false; +} + static int should_keep_rela_group(struct section *sec, int start, int size) { struct rela *rela;