Make linux-gate flexible 15/151715/2
authorAlexander Aksenov <a.aksenov@samsung.com>
Wed, 13 Sep 2017 18:37:35 +0000 (21:37 +0300)
committerAlexander Aksenov <a.aksenov@samsung.com>
Fri, 22 Sep 2017 10:07:46 +0000 (13:07 +0300)
Change-Id: I2963e844842edbd81b5c2c1f6fda297c36750332
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
helper/got_patching.c

index 4fba87a..8834d3e 100644 (file)
@@ -170,10 +170,9 @@ static inline bool _is_for_all_feature(struct feature_desc_t *feature)
        return false;
 }
 
-/* TODO Remove hardcoded ignored bins, make it flexible */
 static inline bool _is_ignored(const char *path)
 {
-       const char linux_gate[] = "linux-gate.so.1";
+       const char linux_gate[] = "linux-gate.so";
        const char linker[] = LINKER_PATH;
 
        if (!strcmp(probelib_main, path) ||
@@ -183,8 +182,9 @@ static inline bool _is_ignored(const char *path)
            !strcmp(probelib_screenshot, path) ||
            !strcmp(probelib_uihv, path) ||
            !strcmp(probelib_lsan, path) ||
-           !strcmp(linux_gate, path) ||
-           !strcmp(linker, path))
+           !strcmp(linker, path) ||
+           /* linux-gate can have different postfix, so check only root */
+           !strncmp(linux_gate, path, sizeof(linux_gate) - 1))
                return true;
 
        return false;