diff --git a/src/compartment.c b/src/compartment.c index 54e9199..5672a28 100644 --- a/src/compartment.c +++ b/src/compartment.c @@ -1074,6 +1074,9 @@ find_lib_dep_sym_in_lib(const char *to_find, struct Compartment *comp_to_search, continue; } + // We build up the conditions needed to find a valid symbol to be + // relocated against in `cond` + // // Ignore `LOCAL` bind symbols - they cannot be relocated against bool cond = curr_sym.sym_bind != STB_LOCAL; @@ -1089,6 +1092,7 @@ find_lib_dep_sym_in_lib(const char *to_find, struct Compartment *comp_to_search, cond = cond && curr_sym.sym_offset != 0; } + // If all conditions pass, we found a valid symbol to relocate against if (cond) { res = (struct LibSymSearchResult) {