In our previous work [4] we proved a bound for gcd(u − 1, v − 1), for S-units u, v of a function field in characteristic zero. This generalized an analogous bound holding over number fields, proved in [3]. As pointed out by Silverman [15], the exact analogue does not work for function fields in positive characteristic. In the present work, we investigate possible extensions in that direction; it turns out that under suitable assumptions some of the results still hold. For instance we prove Theorems 2 and 3 below, from which we deduce in particular a new proof of Weil's bound for the number of rational points on a curve over finite fields (see §4). When the genus of the curve is large compared to the characteristic, we can even go beyond it. What seems a new feature is the analogy with the characteristic zero case, which admitted applications to apparently distant problems.