]> xenbits.xensource.com Git - livepatch-build-tools.git/commitdiff
create-diff-object: Add is_special_section() helper function
authorPawel Wieczorkiewicz <wipawel@amazon.de>
Wed, 21 Aug 2019 08:20:43 +0000 (08:20 +0000)
committerRoss Lagerwall <ross.lagerwall@citrix.com>
Thu, 22 Aug 2019 14:27:25 +0000 (15:27 +0100)
This function determines, based on the given section name, if the
sections belongs to the special sections category.

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>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
create-diff-object.c

index 4699ba026a0dad81d4badd89243a0408c7e2a3ec..0df3fead3bcdf54c956662dca318c9ca6937c733 100644 (file)
@@ -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;