It is studied how taking the inverse image by a sliding block code affects the syntactic semigroup of a sofic subshift. Two independent approaches are used: ζ-semigroups as recognition structures for sofic subshifts, and relatively free profinite semigroups. A new algebraic invariant is obtained for weak equivalence of sofic subshifts, by determining which classes of sofic subshifts naturally defined by pseudovarieties of finite semigroups are closed under weak equivalence. Among such classes are the classes of almost finite type subshifts and aperiodic subshifts. The algebraic invariant is compared with other robust conjugacy invariants.